因为我遇到了一个问题:在Jupyter笔记本中使用from imageio import imread时,出现错误:ModuleNotFoundError: No module named 'imageio' 尽管我可以在终端中成功导入,但是我尝试弄清楚发生了什么. 当我在Jupyter Notebook和终端中执行sys.executable时,结果是不同的:
Because I face a problem: When from imageio import imread in my jupyter notebook, I get the error: ModuleNotFoundError: No module named 'imageio' Whereas I can successfully import in my terminal, I try to figure out what happened. When I execute sys.executable in jupyter notebook and in the terminal, the results are different:
所以我尝试了:(来自 github/jupyter /notebook/issues/1524#issuecomment-229713719 )
So I tried:(from github/jupyter/notebook/issues/1524#issuecomment-229713719)
/Users/shinyuwu/anaconda3/bin/python -m pip install ipykernel /Users/shinyuwu/anaconda3/bin/python -m ipykernel install但是jupyter笔记本和终端中的sys.executable结果仍然不同.谁能帮我吗?
But the sys.executable result in jupyter notebook and terminal are still different. Can anyone help me?
推荐答案一段时间以后我就遇到了这个问题
I had faced this issue some time back
我解决这个问题的方式是
The way I solved this was
从系统中删除IPython和Jupyter
Deleting IPython and Jupyter from the system
rm -rf ~/.local/share/ipython
重新安装IPython和Jupyter
Reinstall IPython and Jupyter
更多推荐
sys.executable结果在终端和jupyter笔记本中有所不同
发布评论