You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The command 'from qiskit_ibm_runtime import QiskitRuntimeService' throws an error:
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
Steps to reproduce
I installed Python 3.12.1 on a new PC which had no python distribution on it.
Then installed qiskit, and qiskit-ibm-runtime
Now while trying to set-up my PC to use IBM Quantum Platform using API tokens I ran the below code (line by line in cmd):
from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService(channel="ibm_quantum", token="<MY_IBM_QUANTUM_TOKEN>")
This is where I received an error:
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
Expected behavior
Suggested solutions
I'm guessing the error is caused because there is no pkg_resource package installed. So to get rid of the error install setuptools using pip install setuptools version 69.0.3. And we should include setuptools in dependencies so a first time user won't encounter this error.
Additional Information
I'm not using qiskit from a virutual environment
qiskit-ibm-runtime version: 0.17.0
Python version: 3.12.1
Operating system: Windows 11 Home 64-bit
The text was updated successfully, but these errors were encountered:
Yes, setuptools used to be pre-installed with pip. But in python version 3.12, devs made a change that distutils, setuptools, pkg_resources, and easy_install will no longer available by default. Here is the link for What's new in python 3.12, and under "Important deprecations, removals or restrictions" they have mentioned this change.
So when running from qiskit_ibm_runtime import QiskitRuntimeService on python 3.12 , an error is generated that module pkg_resources is not found. And to circumvent this error I think we should add setuptools to the dependencies.
Just wanted to mentioned I had the same issue and after doing pip install setuptools the issue was fixed. And I think this issue will be fixed with PR #1347
Describe the bug
The command 'from qiskit_ibm_runtime import QiskitRuntimeService' throws an error:
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
Steps to reproduce
I installed Python 3.12.1 on a new PC which had no python distribution on it.
Then installed qiskit, and qiskit-ibm-runtime
Now while trying to set-up my PC to use IBM Quantum Platform using API tokens I ran the below code (line by line in cmd):
from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService(channel="ibm_quantum", token="<MY_IBM_QUANTUM_TOKEN>")
This is where I received an error:
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
Expected behavior
Suggested solutions
I'm guessing the error is caused because there is no pkg_resource package installed. So to get rid of the error install setuptools using pip install setuptools version 69.0.3. And we should include setuptools in dependencies so a first time user won't encounter this error.
Additional Information
I'm not using qiskit from a virutual environment
The text was updated successfully, but these errors were encountered: