【发布时间】:2020-08-02 16:27:01
【问题描述】:
我最近使用以下命令更新我的 jupyter 包 conda update --all,从那时起我的可视化库将不会导入(matplotlib 和 seaborn)。我使用了conda install <pkg>,即使那样它也不会。所以我重新安装了anaconda3,但同样的问题仍然存在......
我试图查看 sys.executable,发现它不是在 anaconda 中引用我的 python 库,而是在 python click here
'c:\\python38\\python.exe' 所以我使用了pip3 install matplotlib 并且 matplotlib 工作。我希望我的 jupyter 引用它自己的库堆栈,因为我无法在 python 中安装所有库。我希望 jupyter 从此路径读取包:C:\Users\princ\anaconda3\Lib\site-packages,因为所有 anaconda 库都在那里。我该怎么做?请帮帮我。 问题是 jupyter 引用了 python 包文件夹,而不是 anaconda 中预安装的包
SYS.PATH:
'c:\\python38\\python38.zip',
'c:\\python38\\DLLs',
'c:\\python38\\lib',
'c:\\python38',
'',
'C:\\Users\\princ\\AppData\\Roaming\\Python\\Python38\\site-packages',
'c:\\python38\\lib\\site-packages',
'c:\\python38\\lib\\site-packages\\win32',
'c:\\python38\\lib\\site-packages\\win32\\lib',
'c:\\python38\\lib\\site-packages\\Pythonwin',
'c:\\python38\\lib\\site-packages\\IPython\\extensions',
'C:\\Users\\princ\\.ipython']
jupyter 内核规范列表
python3 c:\python38\share\jupyter\kernels\python3
【问题讨论】:
-
不仅是可视化库,pip(python) 未安装的库也不会导入。 conda 已预先安装所有库,但不会导入
标签: matplotlib pip jupyter-notebook anaconda conda