赞
踩
//直接使用下面的指令是不可以的
pip3 install jupyter
会出现这样的问题
虽然也是正常安装了,但是如果直接使用jupyter指令,是无法使用的。
which python3
python3 -m pip install jupyter --user
安装过程会出现这样的warning
WARNING: The scripts jupyter, jupyter-migrate and jupyter-troubleshoot are installed in '/Users/yangxinyu/Library/Python/3.9/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
这个的意思是「你所安装的jupyter没有放在预设路径($PATH)內,而是放在/Users/yangxinyu/Library/Python/3.9/bin」。举个例子,预设路径里面有python3,所以我们只需要在terminal輸入python3就可以执行,不需要打上完整的/usr/bin/python3。因为预设路径的緣故,所以执行Jupyter Notebook,要这样做:
/Users/yangxinyu/Library/Python/3.9/bin/jupyter notebook
# For zsh user
echo export PATH="/Users/yangxinyu/Library/Python/3.9/bin:${PATH}" >> ~/.zshrc
source ~/.zshrc
# For bash user
echo export PATH="/Users/yangxinyu/Library/Python/3.9/bin:${PATH}" >> ~/.bashrc
source ~/.bashrc
which jupyter
jupyter notebook
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。