用pip安装jupyter后,终端仍然找不到jupyter笔记本。

Ubuntu只是说命令没有找到。与ipython类似。pip没有安装好还是怎么了?Ubuntu如何知道在哪里寻找安装了pip的可执行文件?


当前回答

我都试过了,

pip install jupyter

and

pip3 install jupyter

但最后还是用

sudo -H pip install jupyter

以另一个用户-H执行命令

-H (HOME)选项要求安全策略将HOME环境变量设置为密码数据库指定的目标用户(默认为root)的主目录。根据策略的不同,这可能是默认行为。

其他回答

在Mac OS上,您需要导出~/。在$PATH变量中使用local/bin。

# Edit the bash profile:
$ vim ~/.bash_profile

# Add this line inside ~/.bash_profile:
export PATH=$PATH:~/.local/bin

# Update the source:
$ source ~/.bash_profile

# Open Jupyter:
$ jupyter notebook

为了能够从终端运行jupyter notebook,您需要确保~/。Local /bin在您的路径中。

通过执行export PATH=$PATH:~/来实现。当前会话的本地/bin,或者将该行添加到~/的末尾。Bashrc使您的更改在以后的会话中持续(例如使用nano ~/. Bashrc)。如果您编辑~/。Bashrc,您将需要登出并重新登录,以查看您的更改生效。

更新的Jupyter版本默认不附带笔记本组件。

根据你的包管理器,你可以通过以下方式安装笔记本组件:

pip install notebook

or

poetry add notebook

我尝试了所有的方法,最后在运行树莓派4的树莓派操作系统上,这对我来说是有效的

sudo apt install python3-notebook jupyter jupyter-core

用conda重新安装jupyter:

conda install jupyter