question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

QuTip fails on import with numpy 1.22.1

See original GitHub issue

Qutip works fine with numpy 1.21.1, but fails on import with 1.22 numpy, released Dec 31st. Tested on ubuntu and MacOS.

>>> import qutip
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/work/miniconda3/envs/QF9/lib/python3.9/site-packages/qutip/__init__.py", line 73, in <module>
    (_blas_info() == "OPENBLAS" and platform.system() == 'Darwin')
  File "/Users/work/miniconda3/envs/QF9/lib/python3.9/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'

Failure occurs here,

https://github.com/qutip/qutip/blob/52d01da181a21b810c3407812c670f35fdc647e8/qutip/utilities.py#L340

which is kind of mysterious since line 339 explicitly checks that the ‘blas_opt_info’ attribute exists, and then fails at line 340 because the attribute doesn’t exist.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
hodgestarcommented, Feb 4, 2022

I’m working on a 4.6.3 release at the moment.

2reactions
hodgestarcommented, Apr 12, 2022

4.6.3 has been released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter kernel dies while executing qutip.eigenstate(sparse ...
import qutip as qt. A = qt.tensor(qt.sigmax(),qt.sigmay()) A.eigenstates(sparse = True, eigvals = 1). When this runs, the Kernel dies:.
Read more >
Change Log — QuTiP 4.7 Documentation
NAMESPACE CHANGE: QuTiP no longer exports symbols from NumPy and matplotlib, so those modules must now be explicitly imported when required. New module...
Read more >
problem for installation verifying - Google Groups
I tried to verify the installation of the qutip following the instruction ... AttributeError: 'numpy.ndarray' object has no attribute 'dag'.
Read more >
python - Numpy error (module 'numpy.__config__' has no ...
I use Python 3.10.2 in the latest version of Pycharm on mac. I made a few changes to my Pycharm setting to make...
Read more >
Troubleshooting ImportError — NumPy v1.24 Manual
Importing the numpy c-extensions failed. This error can happen for different reasons, often due to issues with your setup. The error also has...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found