美文网首页
[MacOS] Python运行jupyter报错及解决

[MacOS] Python运行jupyter报错及解决

作者: rhea0917 | 来源:发表于2018-07-18 10:59 被阅读0次
$ jupyter notebook

报错:

-bash: jupyter: command not found

原因:
shell中没有jupyter,需要将 用户基础目录bin 目录添加到 PATH 中。

解决方法:

  1. 找到用户基础目录的bin的路径:
$ python -m site

找到USER_BASE(如:/Users/username/Library/Python/2.7,那么bin的路径则为/Users/username/Library/Python/2.7/bin)

  1. 将路径添加到PATH中:
$ touch ~/.bash_profile
$ vim ~/.bach_profile

将export PATH=${PATH}:/Users/username/Library/Python/2.7/bin添加进去。

  1. 再次运行jupyter成功。

相关文章

网友评论

      本文标题:[MacOS] Python运行jupyter报错及解决

      本文链接:https://www.haomeiwen.com/subject/gsxopftx.html