在安装 Python Jupyter环境之前需要先安装Python环境
1.安装Python2和Python3环境,并安装 virtualvenv.
2.安装配置Jupyter
-
使用python3 pip安装jupyter
pip install jupyter

-
生成 jupyter配制文件
jupyter notebook --generate-config

-
生成一个密码hash

-
编辑/home/yang/.jupyter/jupyter_notebook_config.py配制文件

-
启动 Jupyter

启动成功,可直接使用浏览器访问。这里我们已经配制了域名,可以使用域名访问:(也可直接输入IP + 端口访问)

输入我们之前用以生成hash的密码,登录成功后如下图:


3.让Jupyter同时支持 python2和python3
切换到root用户,执行 ipython kernelspec install-self 和 ipython2 kernelspec install-self为Jupyter添加 python2和python3的 kernel支持

4.将 jupyter添加到Linux系统服务中

5.给 jupyter前端添加NGINX代理

最终效果:
