Jupyter notebook, wrong sys.path and sys.executable

后端 未结 3 533
野趣味
野趣味 2021-02-04 12:01

I\'m trying to run the anaconda distribution of python libraries in a Jupyter Notebook, but when I run the notebook I keep getting ImportErrors because the python path is set to

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 12:40

    For me, I installed Jupyter after creating an environment, but then was trying to run a module installed from the base env. I found by "jupyter kernelspec list" (https://github.com/jupyter/notebook/issues/2563), my kernel.json at C:\Users\username\Anaconda37\share\jupyter\kernels\python3\kernel.json was pointing to the python.exe in my working env. Changed the path and solved it.

    This was an exhaustive description of python path setting.

提交回复
热议问题