jupyter-notebook - jupyter notebook执行Jupyter命令 'notebook' : [Errno 2] No such file or directory时出错

标签 jupyter-notebook jupyter

刚安装了jupyter笔记本,当我运行jupyter笔记本时,它说:

jupyter notebook Error executing Jupyter command 'notebook': [Errno 2] No such file or directory

因此,尝试检查存在的命令说:
jupyter --help 
... 
Available subcommands: kernel kernelspec migrate run troubleshoot trust

所以没有笔记本命令?所以我尝试了:
jupyter run

它没有失败,但是不确定在localhost:8888上访问哪个端口,那里什么都没有..您怎么看?我做错了什么吗?

更新:有关我使用的命令和环境的更多信息:
➜  ~ pip list | grep jupyter
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
jupyter-client (5.2.2)
jupyter-core (4.4.0)
➜  ~ history | grep pip
  826  python -m pip install ipykernel
  827  python -m pip install ipykernel\n
  828  sudo python -m pip install ipykernel\n
  943  python -m pip install ipykernel
 1530  python -m pip install ipykernel\n
 1543  python -m pip install ipykernel\n
 1548  pip install nympy
 1550  pip install --upgrade pip\n
 1551  pip install numpy\n
 1552  pip install pyspark
 1553  pip install plotly
 1555  pip install mypy
 1565  pip install pandas
 1570  pip install matplotlib
 1575  pip install hydrogen-scala
 1577  python -m pip install jupyter-scala
 1620  pip install nltk
 1621  pip install sklearn
 1622  pip install scipy
 1669  pip list | grep jupyter

➜  ~ jupyter troubleshoot
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
$PATH:
    /Users/myuser/.pyenv/versions/3.6.4rc1/bin
    /Users/myuser/.pyenv/versions/3.6.4rc1/bin
    /usr/local/Cellar/pyenv/1.2.0/libexec
    /Users/myuser/.rvm/gems/ruby-2.4.1/bin
    /Users/myuser/.rvm/gems/ruby-2.4.1@global/bin
    /Users/myuser/.rvm/rubies/ruby-2.4.1/bin
    /Users/myuser/.pyenv/shims
    /Users/myuser/.pyenv/bin
    /Users/myuser/Downloads/google-cloud-sdk/bin
    /Users/myuser/.nvm/versions/node/v8.4.0/bin
    /usr/local/bin
    /usr/bin
    /bin
    /usr/sbin
    /sbin
    /Users/myuser/.pyenv/bin
    /Users/myuser/.rvm/bin

sys.path:
    /Users/myuser/.pyenv/versions/3.6.4rc1/bin
    /Users/myuser/.pyenv/versions/3.6.4rc1/lib/python36.zip
    /Users/myuser/.pyenv/versions/3.6.4rc1/lib/python3.6
    /Users/myuser/.pyenv/versions/3.6.4rc1/lib/python3.6/lib-dynload
    /Users/myuser/.pyenv/versions/3.6.4rc1/lib/python3.6/site-packages

sys.executable:
    /Users/myuser/.pyenv/versions/3.6.4rc1/bin/python

sys.version:
    3.6.4rc1 (default, Jan 25 2018, 23:18:04)
    [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]

platform.platform():
    Darwin-17.3.0-x86_64-i386-64bit

which -a jupyter:
    /Users/myuser/.pyenv/versions/3.6.4rc1/bin/jupyter
    /Users/myuser/.pyenv/versions/3.6.4rc1/bin/jupyter
    /Users/myuser/.pyenv/shims/jupyter
    /usr/local/bin/jupyter

pip list:
    appnope (0.1.0)
    certifi (2018.1.18)
    chardet (3.0.4)
    cycler (0.10.0)
    decorator (4.2.1)
    idna (2.6)
    ipykernel (4.8.0)
    ipython (6.2.1)
    ipython-genutils (0.2.0)
    jedi (0.11.1)
    jsonschema (2.6.0)
    jupyter-client (5.2.2)
    jupyter-core (4.4.0)
    matplotlib (2.1.2)
    mypy (0.560)
    nbformat (4.4.0)
    nltk (3.2.5)
    numpy (1.14.0)
    pandas (0.22.0)
    parso (0.1.1)
    pexpect (4.3.1)
    pickleshare (0.7.4)
    pip (9.0.1)
    plotly (2.2.3)
    prompt-toolkit (1.0.15)
    psutil (5.4.3)
    ptyprocess (0.5.2)
    py4j (0.10.4)
    Pygments (2.2.0)
    pyparsing (2.2.0)
    pyspark (2.2.1)
    python-dateutil (2.6.1)
    pytz (2017.3)
    pyzmq (16.0.4)
    requests (2.18.4)
    scikit-learn (0.19.1)
    scipy (1.0.0)
    setuptools (28.8.0)
    simplegeneric (0.8.1)
    six (1.11.0)
    sklearn (0.0)
    tornado (4.5.3)
    traitlets (4.3.2)
    typed-ast (1.1.0)
    urllib3 (1.22)
    wcwidth (0.1.7)

最佳答案

我在Linux Mint 19中遇到了相同的问题。

只需在您的终端中输入以下内容

sudo apt install jupyter-notebook

然后输入jupyter-notebook完毕。

关于jupyter-notebook - jupyter notebook执行Jupyter命令 'notebook' : [Errno 2] No such file or directory时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48496465/

相关文章:

python - Jupyter 笔记本内核错误 - FileNotFoundError : [WinError 2]

jupyter-notebook - 我可以自动保存正在运行的 jupyter python 笔记本而不在浏览器选项卡中打开它吗?

python - Getdist 图未显示在控制台中

jupyter-notebook - JupyterLab : Unable to load file after moving notebook to a new location

scala - 有没有办法在 ipython 笔记本中运行 scala 代码?

python - 如何在 matplotlib 图中显示数据

python - 如何从 Jupyter 实验室笔记本下载 .py 文件?

jupyter-notebook - 错误 conda.core.link :_execute(700): An error occurred while installing package 'conda-forge::jupyter_nbextensions_configurator-0.4.1-py37_0'

python - 在 vscode 中打开 ipynb 文件时,JSON 中的意外标记 # 在位置 0

python - plotly 表达 plotly 有褪色的颜色