Qiskit Import Error
Hallo everyone, I want to try using IBMQ from my local computer using API Token. As the documentation, i already try to install qiskit and qiskit ibm runtime in virtual environment(in my case i use conda). The installation is success, and when i try to check the qiskit using pip show qiskit, the result is
(qiskit-env)
PS C:\Users\> pip show
qiskitName: qiskitVersion: 1.3.1Summary: An open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.Home-page: :Author-email: Qiskit Development Team mailto:[email protected]: Apache 2.0Location: d:\conda\envs\qiskit-env\lib\site-packagesRequires: dill, numpy, python-dateutil, rustworkx, scipy, stevedore, symengine, sympy, typing-extensionsRequired-by: qiskit-ibm-runtime
But when i want to use this code in my jupyterlab from qiskit import QuantumCircuit from qiskit.providers.ibmq import IBMQ, The result show:
ImportError: Qiskit is installed in an invalid environment that has both Qiskit >=1.0 and an earlier version. You should create a new virtual environment, and ensure that you do not mix dependencies between Qiskit <1.0 and >=1.0. Any packages that depend on 'qiskit-terra' are not compatible with Qiskit 1.0 and will need to be updated. Qiskit unfortunately cannot enforce this requirement during environment resolution. See for more detail.
What should i do for fixing this issues, Thank you in advance.
Qiskit Import Error
Hallo everyone, I want to try using IBMQ from my local computer using API Token. As the documentation, i already try to install qiskit and qiskit ibm runtime in virtual environment(in my case i use conda). The installation is success, and when i try to check the qiskit using pip show qiskit, the result is
(qiskit-env)
PS C:\Users\> pip show
qiskitName: qiskitVersion: 1.3.1Summary: An open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.Home-page: https://www.ibm.com/quantum/qiskitAuthor:Author-email: Qiskit Development Team mailto:[email protected]: Apache 2.0Location: d:\conda\envs\qiskit-env\lib\site-packagesRequires: dill, numpy, python-dateutil, rustworkx, scipy, stevedore, symengine, sympy, typing-extensionsRequired-by: qiskit-ibm-runtime
But when i want to use this code in my jupyterlab from qiskit import QuantumCircuit from qiskit.providers.ibmq import IBMQ, The result show:
ImportError: Qiskit is installed in an invalid environment that has both Qiskit >=1.0 and an earlier version. You should create a new virtual environment, and ensure that you do not mix dependencies between Qiskit <1.0 and >=1.0. Any packages that depend on 'qiskit-terra' are not compatible with Qiskit 1.0 and will need to be updated. Qiskit unfortunately cannot enforce this requirement during environment resolution. See https://qisk.it/packaging-1-0 for more detail.
What should i do for fixing this issues, Thank you in advance.
Share Improve this question asked Feb 6 at 13:10 M Rifqi AzkiyaM Rifqi Azkiya 1 New contributor M Rifqi Azkiya is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.1 Answer
Reset to default 0You would need to create a fresh virtual environment, activate it and install qiskit in it.
If you want to run a Jupyter notebook with the qiskit packages you just installed, you need to install Jupyter in your virtual environment. See the docs.
Lastly as stated in the error output, ensure that you do not mix dependencies between Qiskit <1.0 and >=1.0. Ensure that you uninstall qiskit-terra
and that no package depends on it because qiskit-terra
is not compatible with qiskit 1.0 and will need to be updated.
See this issue and https://qisk.it/packaging-1-0 for more detail.