Windows 下 IPython NoteBook,pip使用

来源:互联网 发布:白苹果刷机数据恢复 编辑:程序博客网 时间:2024/05/29 13:20

命令:

pip install c:\pyzmq-15.1.0-cp35-none-win32.whl  #安装pyzmq

 easy_install.exe tornado 

pip list 列出安装包


ipython shell下安装MathJax:

from IPython.external.mathjax import install_mathjax

install_mathjax()


安装pyreadline: https://pypi.python.org/pypi/pyreadline


ipython3 notebook


工具地址:

easy_install  https://bootstrap.pypa.io/ez_setup.py

ipython(二进制包) https://github.com/ipython/ipython/downloads


********运行图



**************websocket 无法打开,不能运行代码 重新安装pyzmq无效????



注:

websocket服务 http://www.websocket.org/echo.html

Jupyter是一个交互执行框架,包括基于web的notebook等。IPython是它的一个后端。IPython3.0将是最后一个没有分割的版本了。

pip install --upgrade ipython[all]


[转]远程访问notebook


首先,需要建立一个server的config,通过在命令行键入:

ipython profile create nbserver
然后,修改新建的profile,即ipython_notebook_config.py(命令行会有输出,告诉你生成的文件在哪里),默认的config文件都是被注释掉的,你需要至少修改如下的项:

c = get_config()

# Kernel config
c.IPKernelApp.pylab = 'inline' # if you want plotting support always

# 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:bcd259ccf...your hashed password here'
# It's a good idea to put it on a known, fixed port
c.NotebookApp.port = 9999
但是,你需要注意的是,我们还没有mycert.pem,这个也很简单,使用openssl生成一个就行,如果你手头有linux机器的话就极其简单了:

$ openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
再接着,需要生成一串哈希后的密钥,随便开一个IPython的shell键入:

In [1]: from IPython.lib import passwd
In [2]: passwd()


设定你的密码即可(现在0.13版还不支持多人的notebook,因此只能单用户使用,只支持一个密码罢了,多用户功能处在开发中)。

好了,现在启动你的public的IPython notebook吧:

ipython notebook --profile=nbserver

然后你就可以在浏览器里远程访问你的IPython notebook了。

1 0
原创粉丝点击