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
After successfully installing qiskit-ibm-runtime (version 0.38.0) via pip, attempting import qiskit_ibm_runtime fails with a FileNotFoundError. The error indicates the package is looking for qiskit_ibm_runtime/VERSION.txt relative to the current working directory, instead of its installation location in site-packages. This prevents using the package after a standard installation unless the current working directory happens to be the root of the source code clone.
Steps to reproduce
Start with a clean Python environment (e.g., new venv or container).
Install the necessary packages: pip install qiskit>=1.0 qiskit-ibm-runtime==0.38.0
Ensure the current working directory is outside any cloned source directory for qiskit-ibm-runtime.
Run Python and execute: import qiskit_ibm_runtime
Observe the FileNotFoundError traceback pointing to a path relative to the CWD for VERSION.txt. Example path observed: /kaggle/working/qiskit-ibm-runtime/qiskit_ibm_runtime/VERSION.txt (when CWD was /kaggle/working/qiskit-ibm-runtime).
Expected behavior
The import qiskit_ibm_runtime statement should execute successfully without errors after a standard pip installation, regardless of the current working directory.
Suggested solutions
The code responsible for reading VERSION.txt during package initialization likely needs to be updated to use a path relative to the installed package's location (e.g., using importlib.resources or file) rather than relying on the current working directory.
Additional Information
If the current working directory is set to the root of a cloned source code directory for qiskit-ibm-runtime before attempting the import, the import succeeds because the relative path lookup finds the VERSION.txt file within that source tree. This confirms the issue is related to path resolution after installation.
qiskit-ibm-runtime version: 0.38.0
qiskit version: 2.0.0
Python version: 3.11.11 (Observed on Kaggle, likely affects other 3.x versions)
Operating system: Linux (Ubuntu derivative on Kaggle)
The text was updated successfully, but these errors were encountered:
Describe the bug
After successfully installing qiskit-ibm-runtime (version 0.38.0) via pip, attempting import qiskit_ibm_runtime fails with a FileNotFoundError. The error indicates the package is looking for qiskit_ibm_runtime/VERSION.txt relative to the current working directory, instead of its installation location in site-packages. This prevents using the package after a standard installation unless the current working directory happens to be the root of the source code clone.
Steps to reproduce
Start with a clean Python environment (e.g., new venv or container).
Install the necessary packages:
pip install qiskit>=1.0 qiskit-ibm-runtime==0.38.0
Ensure the current working directory is outside any cloned source directory for qiskit-ibm-runtime.
Run Python and execute:
import qiskit_ibm_runtime
Observe the FileNotFoundError traceback pointing to a path relative to the CWD for VERSION.txt. Example path observed: /kaggle/working/qiskit-ibm-runtime/qiskit_ibm_runtime/VERSION.txt (when CWD was /kaggle/working/qiskit-ibm-runtime).
Expected behavior
The import qiskit_ibm_runtime statement should execute successfully without errors after a standard pip installation, regardless of the current working directory.
Suggested solutions
The code responsible for reading VERSION.txt during package initialization likely needs to be updated to use a path relative to the installed package's location (e.g., using importlib.resources or file) rather than relying on the current working directory.
Additional Information
If the current working directory is set to the root of a cloned source code directory for qiskit-ibm-runtime before attempting the import, the import succeeds because the relative path lookup finds the VERSION.txt file within that source tree. This confirms the issue is related to path resolution after installation.
qiskit-ibm-runtime version: 0.38.0
qiskit version: 2.0.0
Python version: 3.11.11 (Observed on Kaggle, likely affects other 3.x versions)
Operating system: Linux (Ubuntu derivative on Kaggle)
The text was updated successfully, but these errors were encountered: