problem for installation verifying

296 views
Skip to first unread message

Yunita YuChih

unread,
Feb 16, 2021, 11:18:41 PM2/16/21
to QuTiP: Quantum Toolbox in Python
Hello everyone, 

I tried to verify the installation of the qutip following the instruction of the guide, but the result of the verifying comes out with:
AttributeError: 'numpy.ndarray' object has no attribute 'dag'

and the whole result is as following:

QuTiP: Quantum Toolbox in Python ================================ Copyright (c) QuTiP team 2011 and later. Original developers: R. J. Johansson & P. D. Nation. Previous lead developers: Chris Granade & A. Grimsmo. Current admin team: Alexander Pitchford, Paul D. Nation, Nathan Shammah, Shahnawaz Ahmed, Neill Lambert, Eric Giguère, and Boxi Li Project Manager: Franco Nori. Currently developed through wide collaboration. See https://github.com/qutip for details. 

 QuTiP Version: 4.5.2 
Numpy Version: 1.20.1 
Scipy Version: 1.6.0 
Cython Version: 0.29.21 
Matplotlib Version: 3.3.4 
Python Version: 3.8.5 
Number of CPUs: 2 
BLAS Info: OPENBLAS 
OPENMP Installed: False 
INTEL MKL Ext: False 
Platform Info: Darwin (x86_64) Installation path: /Users/nitavica/.local/lib/python3.8/site-packages/qutip ============================================================================== Please cite QuTiP in your publication. ============================================================================== For your convenience a bibtex reference can be easily generated using `qutip.cite()` ============================= test session starts ============================== platform darwin -- Python 3.8.5, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /Users/nitavica/.conda/envs/Qutip/bin/python cachedir: .pytest_cache rootdir: /Users/nitavica collecting ... collected 701 items / 1 error / 61 deselected / 639 selected ==================================== ERRORS ==================================== _ ERROR collecting .local/lib/python3.8/site-packages/qutip/tests/test_three_level.py _ .local/lib/python3.8/site-packages/qutip/tests/test_three_level.py:42: in <module> three_ops = three_level_ops() .local/lib/python3.8/site-packages/qutip/three_level_atom.py:101: in three_level_ops sig11 = one * one.dag() E AttributeError: 'numpy.ndarray' object has no attribute 'dag' =========================== short test summary info ============================ ERROR .local/lib/python3.8/site-packages/qutip/tests/test_three_level.py - At... !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! ================= 61 deselected, 59 warnings, 1 error in 2.76s =================

There seems to be some problem with the packages for the three level system, and how should I fixed it?

Another problem is that, I  see that the items of OPENMP Installed and INTEL MKL Ext are showing false. Will these influence anything? And if those do lead to something  wrong for my running, what should I do to solve them?

(I am conducting the with Jupyter notebook, python 3.8.7, anaconda for python 3.8, mac OS X 10.11.6)

Thank you very much

Jake Lishman

unread,
Feb 17, 2021, 3:54:48 PM2/17/21
to qu...@googlegroups.com
Hello Yunita,

QuTiP is not currently compatible with Numpy 1.20 due to changes in how Numpy 1.20 handles array_like objects. We are working to make a new release which will work. In the meantime, you can work around the issue by pinning your version of Numpy to be 1.19 or lower.

Jake
> --
> You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/qutip/62387a2b-c118-4b57-a8a1-a7aa6c945ffdn%40googlegroups.com.

Yunita YuChih

unread,
Feb 18, 2021, 3:42:51 AM2/18/21
to QuTiP: Quantum Toolbox in Python
Thank you for you replying, Jake. I tried to changed my version of Numpy to 1.19.3( pip install numpy==1.19.3, from https://pypi.org/project/numpy/1.19.3/#files)
but then the installation verifying become like this:

--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-1-7a62d45c5c81> in <module> ----> 1 import qutip.testing as qt 2 qt.run() ~/.local/lib/python3.8/site-packages/qutip/__init__.py in <module> 177 178 # core --> 179 from qutip.qobj import * 180 from qutip.qobjevo import * 181 from qutip.states import * ~/.local/lib/python3.8/site-packages/qutip/qobj.py in <module> 58 import qutip.settings as settings 59 from qutip import __version__ ---> 60 from qutip.fastsparse import fast_csr_matrix, fast_identity 61 from qutip.cy.ptrace import _ptrace 62 from qutip.permute import _permute ~/.local/lib/python3.8/site-packages/qutip/fastsparse.py in <module> 421 #Need to do some trailing imports here 422 #------------------------------------- --> 423 from qutip.cy.spmath import (zcsr_transpose, zcsr_adjoint, zcsr_mult)~/.local/lib/python3.8/site-packages/qutip/cy/__init__.py in <module> ----> 1 from qutip.cy.spmatfuncs import * ~/.local/lib/python3.8/site-packages/qutip/cy/spmatfuncs.pyx in init qutip.cy.spmatfuncs() ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

how could I fixed it now?

螢幕快照 2021-02-18 下午4.41.33.png
ja...@binhbar.com 在 2021年2月18日 星期四上午4:54:48 [UTC+8] 的信中寫道:

Jake Lishman

unread,
Feb 18, 2021, 5:46:24 AM2/18/21
to qu...@googlegroups.com
I'm not sure how you've installed QuTiP, but you need to recompile it. I'd suggest fully uninstalling whatever you've done, and following the installation steps in the documentation (making sure to keep `numpy~=1.19`): http://qutip.org/docs/latest/installation.html. In particular, if at all possible, installations through conda will be much more resilient than ones through pip.

Jake

> On 18 Feb 2021, at 08:42, Yunita YuChih <nitav...@gmail.com> wrote:
>
> Thank you for you replying, Jake. I tried to changed my version of Numpy to 1.19.3( pip install numpy==1.19.3, from https://pypi.org/project/numpy/1.19.3/#files)
> but then the installation verifying become like this:
>
> --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-1-7a62d45c5c81> in <module> ----> 1 import qutip.testing as qt 2 qt.run() ~/.local/lib/python3.8/site-packages/qutip/__init__.py in <module> 177 178 # core --> 179 from qutip.qobj import * 180 from qutip.qobjevo import * 181 from qutip.states import * ~/.local/lib/python3.8/site-packages/qutip/qobj.py in <module> 58 import qutip.settings as settings 59 from qutip import __version__ ---> 60 from qutip.fastsparse import fast_csr_matrix, fast_identity 61 from qutip.cy.ptrace import _ptrace 62 from qutip.permute import _permute ~/.local/lib/python3.8/site-packages/qutip/fastsparse.py in <module> 421 #Need to do some trailing imports here 422 #------------------------------------- --> 423 from qutip.cy.spmath import (zcsr_transpose, zcsr_adjoint, zcsr_mult)~/.local/lib/python3.8/site-packages/qutip/cy/__init__.py in <module> ----> 1 from qutip.cy.spmatfuncs import * ~/.local/lib/python3.8/site-packages/qutip/cy/spmatfuncs.pyx in init qutip.cy.spmatfuncs() ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
>
> how could I fixed it now?
>
> <???? 2021-02-1 8 下午4.41.33.png>
> To view this discussion on the web visit https://groups.google.com/d/msgid/qutip/c6a41278-72d1-4fca-8c23-10a4e5d47c2cn%40googlegroups.com.
> <???? 2021-02-1 8 下午4.41.33.png>

Yunita YuChih

unread,
Feb 18, 2021, 7:20:11 AM2/18/21
to QuTiP: Quantum Toolbox in Python
I have reinstalled everything, and the result now comes out with 
AttributeError: partially initialized module 'qutip' has no attribute 'settings' (most likely due to a circular import)

I looked at the other post, but the condition for the promulgator of that post is using window. What can I do with mac? 
螢幕快照 2021-02-18 下午8.13.02.png
ja...@binhbar.com 在 2021年2月18日 星期四下午6:46:24 [UTC+8] 的信中寫道:

Yunita YuChih

unread,
Feb 21, 2021, 3:22:21 AM2/21/21
to QuTiP: Quantum Toolbox in Python

I finally being able to run it without error, but I found that my versions are :

QuTiP Version:      4.5.3

Numpy Version:      1.18.0

Scipy Version:      1.6.0

Cython Version:     0.29.21

Matplotlib Version: 3.3.4

Python Version:     3.8.5

Is that 4.5.3 for qutip okay to use?
Yunita YuChih 在 2021年2月18日 星期四下午8:20:11 [UTC+8] 的信中寫道:

Jake Lishman

unread,
Feb 21, 2021, 4:35:15 AM2/21/21
to qu...@googlegroups.com
Yes - we released 4.5.3 specifically to solve the Numpy problems you mentioned in your first email. Glad to hear it's working!

Jake

Yunita YuChih

unread,
Feb 21, 2021, 10:01:43 AM2/21/21
to QuTiP: Quantum Toolbox in Python

Thank you very much!!!


ja...@binhbar.com 在 2021年2月21日 星期日下午5:35:15 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages