sudo yum install python2-pipsudo python2 -m pip install wheel setuptools ipython==5.8.0 --index-url=https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cnsudo python2 -m pip install ipykernel==4.10.0 --index-url=https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cnpython2 -m ipykernel install --name python2.7.5
或者
1.直接在/usr/local/python371/share/jupyter/kernels/中添加一个文件夹,名称为kernel_name,例如:python2.7.5
2.文件夹放3个文件:kernel.json logo-32x32.png logo-64x64.png
3.kernel.json内容如下:
{ "display_name": "python2.7.5", "language": "python", "argv": [ "/usr/bin/python2", "-m", "ipykernel_launcher", "-f", "{connection_file}" ]}
4.创建一个启动脚本:start.sh
nohup /usr/local/python371/bin/jupyter notebook > /home/pi/web_notebooks/log/jupyter.log 2>&1 &
5.jupyter内核管理命令
查看jupyter notebook kernel 命令: jupyter kernelspec kernelname删除jupyter notebook kernel 命令: jupyter kernelspce remove kernelname添加:python2 -m ipykernel install —name python2.7列表:python2 -m ipykernel listjupyter kernelspce liust
6.其他
mypip371 install jupyter_contrib_nbextensionspython371 -m jupyter contrib nbextension install --userhttp://localhost:8888/nbextensions?nbextension=toc2/main