安装jupyter总结

使用pip安装的,
pip在python3.x之后自动集成的不需要单独安装,故可以直接使用pip3包管理工具。
执行

pip3 install jupyter

第一次没有成功,提示:
You are using pip version 10.0.1, however version 20.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

于是安照提示执行:

pip3 install --upgrade pip

没有成功。。。
因为使用公司电脑没有root权限,再来

pip3 install --user --upgrade pip

更新最新版本pip成功!

下载jupyter

pip3 install jupyter

不出所料再次失败
看下报错信息,大概是连接超时,需要更新pip包的镜像源,使用的豆瓣的镜像源

pip3 install --index-url https://pypi.douban.com/simple jupyter

安装成功。启动jupyter

jupyter notebook

提示:没有jupyter没有这个命令。

  • 将jupyter添加到用户环境变量
    因为jupyter下载到 /Users//Library/Python/3.7/bin
    mac 的用户环境变量配置需要在 .bash_profile
vim ~/.bash_profile

编辑这个文件将环境变量添加进去,保存,这个时候还不会生效,需要执行

$  source ~/.bash_profile

之前设置的环境变量生效,再次启动,成功。

你可能感兴趣的:(安装jupyter总结)