AttributeError: partially initialized module 'qutip' has no attribute 'settings' (most likely due to a circular import)
See original GitHub issueI installed qutip through Anaconda on MacBook M1. The installation was successful but when I tried to verify the installation through from qutip import *
, I received following error:
`Traceback (most recent call last):
File “/Users/akhil/opt/anaconda3/lib/python3.8/site-packages/qutip/init.py”, line 46, in <module>
IPYTHON
NameError: name ‘IPYTHON’ is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “/Users/akhil/opt/anaconda3/lib/python3.8/site-packages/qutip/init.py”, line 49, in <module> qutip.settings.ipython = False AttributeError: partially initialized module ‘qutip’ has no attribute ‘settings’ (most likely due to a circular import)`
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
As I understand it, the new Mac M1 chips have an ARM-based architecture so there shouldn’t be any compatible binary releases on conda yet for macos - I’m surprised conda even claimed to have solved the system. Maybe they’ve not updated to take the new chips into account either.
If you can, you might want to try building from source - you’ll also need the Python package Cython, but this way should build all the binary components for your architecture. We know (#1395) that there’s a minor problem with some hardware detection on the M1 macs at the moment, but you can comment out lines 48 and 49 of
qutip/hardware_info.py
to work around it.None of us have one of the new macs, and I think we’ll need a new release to get conda-forge updated. It might be a little while before we get that done, sorry.
@Akhikar I know the error message is the same, but could you open a new issue for this and follow the issue template? This bug was addressed awhile ago, and if you open a new issue we’ll know what versions of all the installed software you’re using.
Usually this issue arises when something went wrong while installing QuTiP, or because you have a script whose name conflicts with an existing package name.