jupyter是IPython剥离出来成为一个语言无关的独立软件包。node
jupyter已经支持50多种语言的内核,包括Lisp、R、F#、Perl、Ruby、Scala等。事实上即便IPython自己也是一个jupyter Python模块。提供 REPL(读取,求值,打印循环)交互式开发环境,相似于nrepl或SLIME。python
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-12.0.3.tar.gz#md5=f07e4b0f4c1c9368fcd980d888b29a65 tar -zxvf setuptools-12.0.3.tar.gz cd setuptools-12.0.3 python setup.py install wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz tar zvxf 1.5.5.tar.gz cd pip-1.5.5/ python setup.py install
pip install virtualenv
找一个你喜欢的目录建立虚拟环境,并激活git
mkdir jupyter cd jupyter virtualenv venv --python=python2.7 source ./venv/activate 退出虚拟环境 source ./venv/deactivate
pip install jupyter jupyter notebook --generate-config # 生成配置文件
In [1]: from notebook.auth import passwd In [2]: passwd() Enter password: Verify password: Out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed' openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mykey.key -out mycert.pe # 产生秘钥
vim ~/.jupyter/jupyter_notebook_config.py
# Set options for certfile, ip, password, and toggle off browser auto-opening c.NotebookApp.certfile = u'/absolute/path/to/your/certificate/mycert.pem' c.NotebookApp.keyfile = u'/absolute/path/to/your/certificate/mykey.key' # Set ip to '*' to bind on all interfaces (ips) for the public server c.NotebookApp.ip = '*' c.NotebookApp.password = u'sha1:bcd259ccf...<your hashed password here>' c.NotebookApp.open_browser = False # It is a good idea to set a known, fixed port for server access c.NotebookApp.port = 9999
jupyter notebook # 启动服务
建立文件 requirements.txt 内容以下github
numpy matplotlib scipy pandas scikit-learn
执行命令shell
python -m pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
若是你没有sodu权限,怎么安装须要的一些python包vim
tar xvfz virtualenv-15.1.0.tar.gz cd virtualenv-15.1.0 python virtualenv.py --python=python包的位置 ~/venv source activate