【问题标题】:Fixing installation: jupyter notebook固定安装:jupyter notebook
【发布时间】:2018-04-08 15:41:32
【问题描述】:

我尝试按照说明安装 jupyter:

sudo easy_install pip
python -m pip install --upgrade pip
python -m pip install jupyter

一切正常 - 安装时

  python -m pip install jupyter

这个出现了:

ipython 5.6.0 requires backports.shutil-get-terminal-size; python_version == "2.7", which is not installed.

也已修复,带有

pip install --upgrade backports.shutil_get_terminal_size

Collecting backports.shutil_get_terminal_size
Using cached backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible.
Installing collected packages: backports.shutil-get-terminal-size

我只是忽略了 matplotlib 的所有内容。

但后来我尝试运行 jupyter 输入 bash:

jupyter notebook

我得到的是:

-bash: jupyter: command not found

我已经试过了

open -e ~/.bashrc

喜欢这里的建议: After installing with pip, -bash: Jupyter: command not found 但这出现了:

 The file /Users/ME/.bashrc does not exist.

也试过after installing jupyter locally, I can't run jupyter notebook

~/.local/bin/jupyter

-bash: cd: /.local/bin/jupyter: No such file or directory

有人知道如何解决这个问题吗?

【问题讨论】:

  • 潜在问题:(1)我相信它是 .bashrc,而不是 bashrc(有一个点)。 (2)我认为应该是.local,而不是local(再点) (3)~/.local/bin/jupyter 和/local/bin/jupyter 不一样。我不知道这些是否能解决你的问题,所以这不是一个答案,但值得检查一次。
  • @GoodDeeds 我试过了,但没用。

标签: bash jupyter-notebook jupyter


【解决方案1】:

尝试通过从根目录运行 find 命令来查找 jupyter 命令的安装位置。

cd /
find . -name 'jupyter' -perm -111 -type f -print 2>/dev/null

2>/dev/null 防止显示错误消息。

-perm -111 -type f 只打印出可执行文件。

这应该为您提供 jupyter 可执行文件的路径。为了让生活更轻松,您可以将可执行文件所在位置的别名放入主目录中的 .bashrc 文件中。您似乎不存在此文件,因此您可以使用任何文本编辑器(例如 gedit 或 vim)创建一个。在网上很容易找到有关如何创建别名和使用 .bashrc 文件的说明。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-20
    • 2021-04-20
    • 2017-12-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多