import qutip problem

1,957 views
Skip to first unread message

tami...@gmail.com

unread,
Sep 15, 2017, 12:16:04 PM9/15/17
to QuTiP: Quantum Toolbox in Python
To whom it will concern

My OS system is MacOS 10.12.6 
I have installed Qutip using " conda install qutip" successful from the Terminal.  The successful message is like this

# All requested packages already installed.

# packages in environment at /Users/myusername/anaconda:

qutip                     4.2.0               np113py36_2    conda-forge   


Howerver, when I use python to import the qutip, I always get a error message: No module named qutip.cy.spmatfuncs
Is there anyone who can help me out? Thanks very much.
The following is the command I input in the Python Input line.  Thanks for your kindness help.

In [1]: from qutip import *
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-674d9281af88> in <module>()
----> 1 from qutip import *

/Users/tamintai/qutip/__init__.py in <module>()
    169 
    170 # core
--> 171 from qutip.qobj import *
    172 from qutip.states import *
    173 from qutip.operators import *

/Users/tamintai/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

/Users/tamintai/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)

/Users/tamintai/qutip/cy/__init__.py in <module>()
----> 1 from qutip.cy.spmatfuncs import *

ModuleNotFoundError: No module named 'qutip.cy.spmatfuncs'
===============================================message end=============================================== 

Best regards
Tamin

Tamin Tai

unread,
Sep 15, 2017, 12:58:35 PM9/15/17
to QuTiP: Quantum Toolbox in Python
To whom it will concern 

I further check if the following command can work by running the following.  I still get error.   I really have no idea.  I appreciate your time to reply my question in advance. Thanks.

[2] from qutip import *
about()
=====================message begin===========================
AttributeError                            Traceback (most recent call last)
/Users/tamintai/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-ef0e20331cfc> in <module>()
----> 1 from qutip import *
      2 about()
      3 

/Users/tamintai/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'
=========================message end ==========================================

Paul Nation

unread,
Sep 15, 2017, 1:03:04 PM9/15/17
to QuTiP Group
What directory are you running it from?

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tamin Tai

unread,
Sep 15, 2017, 2:19:57 PM9/15/17
to QuTiP: Quantum Toolbox in Python
Dear Paul 

I think I put the Qutip-4.2.0 folder under the USERS folders as shown the attached image. 
Then I run the Anaconda Navigator and open the IP[y] as usual.   I don't  create a qutip-env and directly put qutip under the conda environment root as shown in the 2nd attached picture. I think its directory is " users/tamintai/anaconda.  

Is everything right?  Sorry I am quite new for python.

Best regards
Tamin
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
Screen Shot 2017-09-15 at 2.01.22 PM.png
Screen Shot 2017-09-15 at 2.14.20 PM.png

Paul Nation

unread,
Sep 15, 2017, 2:33:56 PM9/15/17
to QuTiP Group
You installed QuTiP via conda, so there is no need for having the QuTiP folder or using the Anaconda interface.  Just open a terminal and run IPython.  Make sure that the directory is NOT the QuTiP folder.

-P

To unsubscribe from this group and stop receiving emails from it, send an email to qutip+unsubscribe@googlegroups.com.

Tamin Tai

unread,
Sep 15, 2017, 3:26:14 PM9/15/17
to QuTiP: Quantum Toolbox in Python
Dear Paul

Thank you very much.  I solve the problem.   Thanks again.

Best regards
Tamin

Paul Nation

unread,
Sep 15, 2017, 3:32:55 PM9/15/17
to QuTiP Group
No worries.

-P

To unsubscribe from this group and stop receiving emails from it, send an email to qutip+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages