macOSX Python2工具Jupyter Notebook安装问题

Mac osx上python2,pip install jupyter执行到最后会报OSError: [Errno 1] Operation not permitted:的问题,sudo也不能给予足够的权限,调查发现是SIP机制导致。

1,解决方法:基于用户权限安装模块

pip install jupyter --user --upgrade

2.1,成功安装后,输入Jupyter Notebook提示命令无效,考虑环境变量未设置,需要确认安装路径

find ~ -iname "jupyter"

返回/Users/local_user_name/Library/Python/2.7/bin/jupyter

2.2,配置以上路径到环境变量~/.bash_profile,并source,重启terminal

jupyter=/Users/local_user_name/Library/Python/2.7/bin

PATH=$jupyter:$PATH

export PATH

source ~/.bash_profile

3,输入Jupyter Notebook,启动Jupyter

你可能感兴趣的:(macOSX Python2工具Jupyter Notebook安装问题)