简体   繁体   English

尽管已安装,jupyter 笔记本电脑仍无法在 Mac 上工作

[英]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 pippip3 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.

相关问题 gdal 已安装但在 Jupyter Notebook 中不起作用 - gdal installed but not working in Jupyter Notebook 尽管已安装模块,但 jupyter 笔记本中未定义 skimage - skimage is not defined in jupyter notebook despite having installed the module 尽管 jupyter notebook 工作正常,但 python 中的单元测试无法正常工作 - Unit test in python is not working despite jupyter notebook working fine 尽管已安装,但在 Jupyter 笔记本中无法找到 Tensorflow 模块 - Unable to Find Tensorflow Module in Jupyter Notebooks Despite Being Installed 未安装Anaconda / jupyter的笔记本 - notebook not installed with anaconda/jupyter 尽管安装了ModuleNotFoundError - ModuleNotFoundError Despite being Installed Jupyter笔记本尽管已下载,但每次导入都会返回“找不到模块” - Jupyter-notebook returns “module not found” for every single import, despite them being downloaded 我的 jupyter 笔记本是笔记本不工作 - My jupyter notebook is notebook is not working Pycharm jupyter notebook wsl:未安装 Jupyter 包 - Pycharm jupyter notebook wsl: Jupyter package is not installed 尽管安装了正确的依赖项,为什么 PyUSB 不能在 Windows 10 上运行? - Why is PyUSB not working on Windows 10 despite the proper dependency being installed?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM