Linux import error

62 views
Skip to first unread message

蔡家麒

unread,
May 15, 2017, 6:03:14 PM5/15/17
to QuTiP: Quantum Toolbox in Python
I'm using Ubuntu 14.02

from qutip import *

Then comes error:
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-674d9281af88> in <module>()
----> 1 from qutip import *

/home/caidish1234/anaconda3/lib/python3.6/site-packages/qutip/__init__.py in <module>()
    169 
    170 # core
--> 171 from qutip.qobj import *
    172 from qutip.states import *
    173 from qutip.operators import *

/home/caidish1234/anaconda3/lib/python3.6/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

/home/caidish1234/anaconda3/lib/python3.6/site-packages/qutip/fastsparse.py in <module>()
    404 #Need to do some trailing imports here
    405 #-------------------------------------
--> 406 from qutip.cy.spmath import (zcsr_transpose, zcsr_adjoint, zcsr_mult)

ImportError: /home/caidish1234/anaconda3/lib/python3.6/site-packages/qutip/cy/spmath.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZTINSt8ios_base7failureB5cxx11E

try it again,the error changes to:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/home/caidish1234/anaconda3/lib/python3.6/site-packages/qutip/__init__.py in <module>()
     46     __IPYTHON__
---> 47     qutip.settings.ipython = True
     48 except:

AttributeError: module 'qutip' has no attribute 'settings'

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
<ipython-input-2-674d9281af88> in <module>()
----> 1 from qutip import *

/home/caidish1234/anaconda3/lib/python3.6/site-packages/qutip/__init__.py in <module>()
     47     qutip.settings.ipython = True
     48 except:
---> 49     qutip.settings.ipython = False
     50 
     51 # -----------------------------------------------------------------------------

AttributeError: module 'qutip' has no attribute 'settings'

蔡家麒

unread,
May 15, 2017, 6:36:57 PM5/15/17
to qu...@googlegroups.com
I fixed this....just:
sudo apt-get install build-essential

--
You received this message because you are subscribed to a topic in the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qutip/kRQo8sZk0CM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qutip+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Nation

unread,
May 17, 2017, 2:12:29 PM5/17/17
to QuTiP Group
It is more likely that you were running QuTiP from the installation directory.

-P
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.
Reply all
Reply to author
Forward
0 new messages