AttributeError: partially initialized module 'qutip' has no attribute 'settings' (most likely due to a circular import)

1,006 views
Skip to first unread message

Lorena Lima

unread,
Feb 2, 2021, 11:34:49 AM2/2/21
to QuTiP: Quantum Toolbox in Python
I am having trouble to install qutip. I've followed all the step by step installation guide, but when I run the test code in Spyder, the following error appears: AttributeError: partially initialized module 'qutip' has no attribute 'settings' (most likely due to a circular import). How can I fix it? I've already installed C++ Visual Studio and updated Conda and Spyder.

Boxi Li

unread,
Feb 2, 2021, 4:13:58 PM2/2/21
to QuTiP: Quantum Toolbox in Python
Looks like you are installing from source on Windows. It often occurs that the Cython code is not successfully compiled, although python tells you that qutip has been successfully installed. Have you tried to uninstall qutip and using `python setup.py install` to reinstall qutip after Visual Studio is installed? Have you also preinstalled numpy, scipy and cython?

If reinstalling does not work, could you give the command you used to install qutip?

Best
Boxi

Lorena Lima

unread,
Feb 10, 2021, 9:50:48 AM2/10/21
to QuTiP: Quantum Toolbox in Python
Thank you, Boxi. I reinstalled the package and updated  Visual Studio and  now things are working properly.  :)

Suleiman Abdulrhman

unread,
Mar 26, 2023, 5:52:40 PM3/26/23
to QuTiP: Quantum Toolbox in Python
Hello! 
Boxi, I'm having a similar problem with Qutip. I have successful installed the library, but I keep getting this error: "AttributeError: module 'qutip' has no attribute 'depolarize' ". How do I go about it? 
Thank you.

Simon Cross

unread,
Mar 27, 2023, 4:07:57 AM3/27/23
to qu...@googlegroups.com
Hi Suleiman,

Your issue appears unrelated to the one in this thread. Would you mind
starting a new thread?

I don't think QuTiP is expected to have a function called 'depolarize'
in recent versions. In the new thread, could you say what are you
trying to do, what code you are trying to run?

Regards,
Simon

Suleiman Abdulrhman

unread,
Apr 10, 2023, 7:42:42 AM4/10/23
to QuTiP: Quantum Toolbox in Python
Hi Simon,
thanks for the clarity. I will do so to create a new thread.
 
Regards,
Suleiman
Reply all
Reply to author
Forward
0 new messages