系统可执行文件结果在terminal和jupyter noteb中是不同的

2024-04-24 11:13:50 发布

您现在位置:Python中文网/ 问答频道 /正文

因为我面临一个问题:当from imageio import imread在我的jupyter笔记本中,我得到错误:ModuleNotFoundError: No module named 'imageio' 虽然我可以在我的终端中成功导入,但我试图找出发生了什么。 当我在jupyter笔记本和终端中执行sys.executable时,结果不同: enter image description here

enter image description here

所以我试着:(从https://github.com/jupyter/notebook/issues/1524#issuecomment-229713719

/Users/shinyuwu/anaconda3/bin/python -m pip install ipykernel
/Users/shinyuwu/anaconda3/bin/python -m  ipykernel install

但是系统可执行文件结果jupyter笔记本和终端还是不一样的。有人能帮我吗?你知道吗


Tags: installfromimport终端bin错误笔记本jupyter
1条回答
网友
1楼 · 发布于 2024-04-24 11:13:50

我很久以前就遇到过这个问题

我解决这个问题的方法是

  1. 从系统中删除IPython和Jupyter

  2. rm -rf ~/.local/share/ipython

  3. 重新安装IPython和Jupyter

相关问题 更多 >