terminal执行jupyter-notebook命令后找不到命令 每次执行 ~/.local/bin/jupyter-notebook需要输入太多字符,因此需要将上述路径添加到PATH
参考LINUX中查看、添加、删除PATH以及永久添加PATH
如果想要永久的加入某个路径就需要在/etc/profile文件中加入,对于永久有效的路径同样只能够从/etc/profile文件中才能永远删除。
打开/etc/profile这个配置文件:
sudo vim /etc/profile
在末尾添加以下路径:
export PATH
=$PATH:~/.local/bin/
使新的环境变量生效
source /etc/profile
然而出现问题:
/etc/profile:35: no matches found: tty
[1-6
]
参考文章/etc/profile修改了报错
输入bash进入bash
bash
source /etc/profile
使得新的环境变量生效 之后就可以通过terminal输入jupyter-notebook开启了