简体   繁体   English

OSError:[Errno'jupyter-notebook'not found] 2

[英]OSError: [Errno 'jupyter-notebook' not found] 2

Hi I have installed " Anaconda3-4.3.1-Windows-x86_64 " in my desktop but i get below error when I run the command " jupyter notebook " from CMD. 嗨我已经在我的桌面上安装了“ Anaconda3-4.3.1-Windows-x86_64 ”,但是当我从CMD运行命令“ jupyter notebook ”时,我得到以下错误。

Error: 错误:

C:\Users\my pc>jupyter notebook
Traceback (most recent call last):
File "C:\Users\pr275959\AppData\Local\Continuum\Anaconda3\Scripts\jupyter-script.py", line 5, in <"module">
   sys.exit(jupyter_core.command.main())
File "C:\Users\pr275959\AppData\Local\Continuum\Anaconda3\lib\site-packages\jupyter_core\command.py", line 186, in main
_execvp(command, sys.argv[1:])
  File "C:\Users\pr275959\AppData\Local\Continuum\Anaconda3\lib\site-packages\jupyter_core\command.py", line 104, in _execvp
    raise OSError('%r not found' % cmd, errno.ENOENT)
OSError: [Errno 'jupyter-notebook' not found] 2

在此输入图像描述

After installing anaconda, create a new environment using the following command 安装anaconda后,使用以下命令创建新环境

conda create -n yourenvname python=xx anaconda

Then active the environment using 然后使用激活环境

source activate yourenvname

Now install jupyter 现在安装jupyter

conda install jupyter

Then,run jupyter-notebook 然后,运行jupyter-notebook

对我来说,只需安装jupyter全局解决它:

 conda install jupyter

I tried this and it worked for me: 我试过这个,它对我有用:

For Python 2 对于Python 2

pip install --upgrade --force-reinstall --no-cache-dir jupyter

For Python 3 对于Python 3

pip3 install --upgrade --force-reinstall --no-cache-dir jupyter

This should reinstall everything from PyPi. 这应该从PyPi重新安装所有东西。 This should solve the problem as I think running pip install "ipython[notebook]" messed things up. 这应该解决问题,因为我认为运行pip install“ipython [notebook]”搞砸了。

View_source View_source

I ran into a similar issue and was able to solve it by using the Anaconda prompt. 我遇到了类似的问题,并能够通过使用Anaconda提示解决它。

In cmd, when I ran jupyter notebook, I would get the error message "Jupyter is not recognized as an internal or external command." 在cmd中,当我运行jupyter笔记本时,我会收到错误消息“Jupyter未被识别为内部或外部命令。” But the same code running in Anaconda prompt would launch the notebook. 但是在Anaconda提示符下运行的相同代码将启动笔记本。

If you installed Anaconda 3.X in Windows and getting an error "Error executing Jupyter command 'notebook': [Errno 'jupyter-notebook' not found] 2" when you run pyspark --master local[*] 如果您在Windows中安装了Anaconda 3.X并收到错误"Error executing Jupyter command 'notebook': [Errno 'jupyter-notebook' not found] 2"当您运行pyspark --master local[*]

Try, 尝试,

pip install jupyter

and then run pyspark --master local[*] 然后运行pyspark --master local[*]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM