[jupyter] Jupyter cannot load installed package Jupyter报错‘No module named ..’,但已经安装

版权声明:Copyright reserved to Hazekiah Wang ([email protected]) https://blog.csdn.net/u010909964/article/details/84195171

I am using anaconda3 and pip install a package ‘BayesianOptimization’.
I confirmed the installation of the package by conda list Bayes,however Jupyter Notebook just couldn’t find it.

According to this answer, I first checked the sys.path, and it showed exactly that I was using the jupyter from another conda env.

source activate tensorflowproblem
conda install notebook ipykernel
ipython kernel install --user

the final line worked for me.
After the installation, the sys.path has changed to the current env.
But the problem still exists. Say my current env is A, and the other confusing env is B. When I type ipython kernel install --user, Jupyter turns to env A, and env B doesn’t work normally.

猜你喜欢

转载自blog.csdn.net/u010909964/article/details/84195171