Mac/windows——mac使用终端安装jupyter notebook及遇到zsh:command not found解决办法

〇、前情提要

开搞机器学习了 需要使用jupyter notebook
参考:
1.【到处是bug】zsh使用jupyter,command not found
https://www.jianshu.com/p/bdf6115339da
2. 简明 VIM 练级攻略
https://www.cnblogs.com/chengjiawei/p/9339951.html

一、jupyter notebook的正常安装

打开终端,依次输入

pip3 install jupyter
jupyter notebook
即可正常运行如下:

但是可能会遇到zsh:command not found问题,请移至二、遇到zsh:command not found解决办法

 

二、遇到zsh:command not found解决办法

1.找jupyter的路径
pip3 show jupyter

 

得到路径/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages

2.vim编写
vim ~/.zshrc
粘贴如下,结束后输入:wq并回车,退出编辑

export PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin/:$PATH

3. 载入命令,并启动jupyter notebook

source .zshrc
jupyter notebook

 

参考:https://blog.csdn.net/weixin_43210113/article/details/107018038

 

posted @ 2021-12-30 17:43  马踏飞燕Beautiful  阅读(1641)  评论(0编辑  收藏  举报