Salvatore
Salvatore

Reputation: 1

How to add Qutip to Spyder?

I installed the Qutip package on the Windows terminal, and I've seen it works perfectly when I use it on jupyter notebooks from the Windows terminal. Instead, when I've tried to use it in Spyder, instead, I have received an error message with "ModuleNotFoundError: No module named 'qutip'".

I have tried to follow the instructions given on the Spyder website (https://docs.spyder-ide.org/5/faq.html#using-existing-environment). First attempt was going on the Anaconda prompt and putting: conda install conda-forge::qutip The installation worked, but Spyder still gave the same error. Then I tried another procedure given in their website: conda create -n my-env -c conda-forge spyder-kernels qutip Again, in installed a series of packages, but in Spyder it continued not to work.

Upvotes: 0

Views: 121

Answers (1)

Bruno Augusto Veloso
Bruno Augusto Veloso

Reputation: 50

I think it is not exactly a question about QuTip but about Spyder usage. You need to set Spyder environment to be the same that you have installed QuTiP.

To do so, first use

conda env list

to find the path of QuTiP env. Then on Tools > Preferences > Python interpreter define the interpteter to the paht of the desired env, and restart the Kernel.

More info at: https://docs.spyder-ide.org/current/faq.html#using-spyder

Upvotes: 1

Related Questions