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