Chaquopy无法安装Qiskit
您好,我试图用Chaquopy(12.0.0)和Qiskit(0.34.2)构建一个应用程序。 Gradle Sync的发生良好。但是,当我去构建应用程序并将其安装在手机上时。它给出了Qiskit软件包的错误,如错误:命令错误在退出状态1:时错误。另一个软件包安装正常,并且该应用程序正在运行,而其他python函数被称为,只是qiskit给出了问题。
我尝试使用Python 3.8,但给出了相同的错误,我当前的Python版本是3.9
Gradle版本(8.0) 这是我的gradle文件
python {
buildPython "C:/Program Files/python/python3.8/python.exe"
pip {
// A requirement specifier, with or without a version number:
install "numpy"
install "qiskit==0.36.2"
install "matplotlib"
}
}
,这是我正在使用的python文件
from qiskit import *
from qiskit.tools.visualization import plot_histogram
from qiskit.tools.visualization import plot_state_qsphere
from qiskit.tools.visualization import plot_bloch_multivector
def bv(num):
return "test return"
Hello I am trying to build an app with Chaquopy(12.0.0) and qiskit(0.34.2). The gradle sync is happening fine. But when I go and build the app and install it on my phone. it give error for the qiskit package as ERROR: Command errored out with exit status 1:. The other package are installing fine, and the app is running, with other python function being called, just qiskit is giving problem.
I tried to used python 3.8, but gives the same error, my current python version is 3.9
gradle version(8.0)
Here's my gradle file
python {
buildPython "C:/Program Files/python/python3.8/python.exe"
pip {
// A requirement specifier, with or without a version number:
install "numpy"
install "qiskit==0.36.2"
install "matplotlib"
}
}
here is the python file I am using
from qiskit import *
from qiskit.tools.visualization import plot_histogram
from qiskit.tools.visualization import plot_state_qsphere
from qiskit.tools.visualization import plot_bloch_multivector
def bv(num):
return "test return"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来Qiskit的最后一个纯Python版本为0.7.0,因此您可以尝试一下。较新的版本都包含本机组件,因此需要专门为Android构建。有关更多详细信息,请参见此chaquopy问题。
It looks like the last pure-Python version of qiskit was 0.7.0, so you could give that a try. Newer versions all contain native components, so they'd need to be built specifically for Android. For more details, see this Chaquopy issue.