Import Error

13 views
Skip to first unread message

MS

unread,
Jan 20, 2022, 10:41:42 AM1/20/22
to QuTiP: Quantum Toolbox in Python
Dear all,

I am trying to use QuTIP for a university project. However, when running the Python script, the import of QuTIP fails with the following message:

Traceback (most recent call last):
  File "/Users/PycharmProjects/pythonProject/pythonProject3/main.py", line 6, in <module>
    import qutip
  File "/Users/PycharmProjects/pythonProject/pythonProject3/venv/lib/python3.8/site-packages/qutip/__init__.py", line 73, in <module>
    (_blas_info() == "OPENBLAS" and platform.system() == 'Darwin')
  File "/Users/PycharmProjects/pythonProject/pythonProject3/venv/lib/python3.8/site-packages/qutip/utilities.py", line 430, in _blas_info
    blas_info = config.blas_opt_info
AttributeError: module 'numpy.__config__' has no attribute 'blas_opt_info'

The code I try to run is super simple: 
import numpy
import qutip

Does anyone know this problem or how to solve it? I really do not know what is going wrong since I just created a project in PyCharm, installed the two packages using pip and then run the code.

Thankful for any help!

MS

MS

unread,
Jan 20, 2022, 10:45:35 AM1/20/22
to QuTiP: Quantum Toolbox in Python
Some further, maybe relevant information: I use a Mac with macOS Monterey and an Intel i7.

Simon Cross

unread,
Jan 20, 2022, 10:53:42 AM1/20/22
to qu...@googlegroups.com
Hi MS,

You're encountering this issue https://github.com/qutip/qutip/issues/1766 which results from a change in numpy 1.22. It's been fixed in the QuTiP master branch, but not released yet (it will be released with 4.6.3).

In the meantime you can install numpy 1.20 or 1.21 or install QuTiP from the master branch. Likely the former is easier (just "pip install numpy==1.20" or equivalent).

Good luck with your project and let us know if you encounter any other issues.

Yours sincerely,
Simon Cross
Reply all
Reply to author
Forward
0 new messages