question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
jakelishmancommented, Dec 1, 2020

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.

0reactions
hodgestarcommented, Aug 19, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

partially initialized module 'qutip' has no attribute 'settings ...
AttributeError : partially initialized module 'qutip' has no attribute 'settings' (most likely due to a circular import). 296 views.
Read more >
How to fix AttributeError: partially initialized module? [duplicate]
"Most likely due to a circular import" refers to a file (module) which has a dependency on something else and is trying to...
Read more >
AttributeError: partially initialized module has no attribute
The Python "AttributeError: partially initialized module has no attribute" occurs for two main reasons: Having a circular dependency between ...
Read more >
Developers - AttributeError: partially initialized module 'qutip' has no ...
AttributeError : partially initialized module 'qutip' has no attribute 'settings' (most likely due to a circular import)
Read more >
partially initialized module has no attribute (most likely due to ...
This can happen when there's a local file with the same name as an imported module – Python sees the local file and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found