[英]jupyter notebook not working Mac despite being installed
I have jupyter notebook installed but when I try and open it I get this error.我安装了 jupyter notebook,但是当我尝试打开它时出现此错误。 Any idea why?知道为什么吗?
Traceback (most recent call last):
File "/usr/local/bin/jupyter", line 8, in <module>
sys.exit(main())
File "/Library/Python/2.7/site-packages/jupyter_core/command.py", line 247, in main
command = _jupyter_abspath(subcommand)
File "/Library/Python/2.7/site-packages/jupyter_core/command.py", line 134, in _jupyter_abspath
'Jupyter command `{}` not found.'.format(jupyter_subcommand)
Exception: Jupyter command `jupyter-notebook` not found.
One solution would be to switch to python3.一种解决方案是切换到 python3。
I would advise to check if python3 is installed by running python3 --version
我建议通过运行python3 --version
检查是否安装了python3 --version
If it is installed, pip3 install --upgrade pip
and pip3 install jupyter
should solve your problem, as jupyter should use python 3 in its kernel after that.如果已安装, pip3 install --upgrade pip
和pip3 install jupyter
应该可以解决您的问题,因为之后 jupyter 应该在其内核中使用 python 3。
If python3 is not installed, I would suggest installing it, after which repeat the step above.如果没有安装python3,我建议安装它,然后重复上面的步骤。
not above!不在上面! 1-run << brew cask install anaconda >> on terminal在终端上运行 1 次 << brew cask install anaconda >>
after that anaconda was successfully install...在成功安装anaconda之后......
2- run << export PATH="/usr/local/anaconda3/bin:$PATH" >> on terminal 2- 在终端上运行 << export PATH="/usr/local/anaconda3/bin:$PATH" >>
3- run << source ~/.zshrc >> on terminal and close then open terminal again 3- 在终端上运行 << source ~/.zshrc >> 并关闭然后再次打开终端
4- now run << jupyter notebook >> on terminal 4- 现在在终端上运行 << jupyter notebook >>
now notebook will show on this path: http://localhost:8888/tree现在 notebook 将显示在此路径上: http://localhost:8888/tree
That's all就这样
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.