介绍
本文介绍一下如何在vagrant里配置Jupyter开发环境,并在本机上可以用浏览器访问。
Vagrant File 需要修改配置
| 1 | config.vm.network "forwarded_port", guest: 8888, host: 8888 | 
Check 一下包是否都安装
| 1 | jinja2 | 
如果有没有安装的安装一下:1
sudo apt-get install jinja2 sphinx pyzmq tornado ipython
安装Jupyter
直接pip安装,sudo模式,或者virtualenv环境1
pip install jupyter
修改Jupyter配置为
| 1 | jupyter notebook --generate-config | 
以上将会在 ~/.jupyter/ 下创建默认config 文件: jupyter_notebook_config.py1
2# The IP address the notebook server will listen on.
c.NotebookApp.ip = '0.0.0.0'
原本是localhost,改一下就行
或者运行1
jupyter notebook --ip=0.0.0.0.
然后本机浏览器登录localhost:8888就可以了。
因为我们是朋友,所以你可以使用我的文字,但请注明出处:http://alwa.info