@nrailgun
2017-04-04T15:51:20.000000Z
字数 767
阅读 2705
强力软件
PC 性能比较差,用来跑 Python 做科学计算比较痛苦,服务器性能较好,但是 GUI 拖慢交互速度,没有 GUI 可视化不方便。我强烈推荐 IPython notebook 这个神奇的软件。IPython notebook 将浏览器作为代替 SSH 的交互环境,同时提供图形化能力。
(1)安装 anaconda:
bash Anaconda-2.3.0-Linux-x86_64.sh
export PATH="/usr/local/anaconda/bin:$PATH"
(2)在 IPython 中生成 sha1 密码:
from IPython.lib import passwd
passwd()
Enter password:
Verify password:
Out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
(3)更改 notebook 设置:
jupyter notebook --generate-config
c = get_config()
# Notebook config
c.NotebookApp.certfile = u'/absolute/path/to/your/certificate/mycert.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
# It is a good idea to put it on a known, fixed port
c.NotebookApp.port = 9999
(4)启动服务器:
ipython notebook