用pip安装jupyter后,终端仍然找不到jupyter笔记本。
Ubuntu只是说命令没有找到。与ipython类似。pip没有安装好还是怎么了?Ubuntu如何知道在哪里寻找安装了pip的可执行文件?
用pip安装jupyter后,终端仍然找不到jupyter笔记本。
Ubuntu只是说命令没有找到。与ipython类似。pip没有安装好还是怎么了?Ubuntu如何知道在哪里寻找安装了pip的可执行文件?
当前回答
任何人寻找运行的jupyter作为sudo,当jupyter安装virtualenv(没有sudo) -这为我工作:
首先验证这是一个PATH问题:
检查jupyter返回的路径是否被sudo用户覆盖:
sudo env | grep ^PATH
(相对于当前用户:env | grep ^PATH)
如果它没有覆盖-添加一个软链接从它覆盖的路径之一。为例:
sudo ln -s /home/user/venv/bin/jupyter /usr/local/bin
现在你应该能够运行:
sudo jupyter notebook
其他回答
Try
Python -m notebook
或者,如果您使用pip3安装笔记本:
Python3 -m笔记本
在Mac OS Catalina和Python3.7上
如果你使用'pip'而不是'pip3'为Python 2安装Jupyter notebook,它可能会运行:
ipython notebook
你没有退出并重新登录吗?它应该在您执行的路径上。 如果不是,pip在.local中安装可执行文件,所以在终端中:
~/.local/bin/jupyter-notebook
应该开始写笔记本
安装 jupyterlab。
如果你得到这个错误:
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
requests 2.25.1 requires idna<3,>=2.5, but you'll have idna 3.1 which is incompatible.
用这个:
pip3 install jupyterlab --use-feature=2020-resolver
大多数情况下(在jupyter不在/local/bin的情况下)使用,
which jupyter
示例输出
~/miniconda3/bin/jupyter
要查看jupyter的路径,请使用sudo显式地使用该路径
sudo ~/miniconda3/bin/jupyter