我尝试按照说明安装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忽略了一切。
但后来我尝试在bash中运行jupyter:
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
有人知道如何解决这个问题吗?
答案 0 :(得分:0)
尝试通过从根目录运行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文件的说明很容易在网上找到。