基于 python2.7.13 32-bit版本安裝
1、安裝pyreadline
https://pypi.python.org/pypi/pyreadline
下載對(duì)應(yīng)的32位版本
安裝Microsoft Visual C++ Compiler for Python 2.7 并安裝
http://www.microsoft.com/en-us/download/details.aspx?id=44266
2孵户、用pip安裝iPython
進(jìn)入目錄 c:\Python27\Scripts>
輸入命令: pip install ipython
2.1 或者從git安裝iPython
https://github.com/ipython/ipython.git
把ipython.git pull 下來萧朝,checkout 到5.1分支(適用于Python2.7)。
使用cmd進(jìn)入ipython目錄夏哭,輸入 python setup.py install 即可
檢查iPython是否安裝成功
命令行輸入 ipython 即可進(jìn)入ipython
命令行輸入 ipython --pylab
ipython會(huì)自動(dòng)importSciPy,NumPy和matplotlib包检柬,也就是不需要在命令輸入 from numpy import * 等命令
3、安裝notebook
pip install jupyter
安裝成功后,命令行輸入:
jupyter notebook
http://localhost:8888/ 檢查notebook服務(wù)器是否已經(jīng)啟動(dòng)
4何址、查看已安裝的包
pip list
5里逆、安裝擴(kuò)展
https://github.com/ipython-contrib/jupyter_contrib_nbextensions
安裝命令:
pip install jupyter_contrib_nbextensions
(或者用命令:pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master)
jupyter contrib nbextension install --user
運(yùn)行Jupyter Notebook, 在打開的Notebook界面里, 你會(huì)發(fā)現(xiàn)多了一個(gè)Nbextensions,勾選Table of Contents (有的版本是toc2). 然后創(chuàng)建或者打開一個(gè)Jupter Notebook
如果是anaconda,可以使用命令:
conda install -c conda-forge jupyter_contrib_nbextensions
5用爪、安裝Jupyter themes
https://github.com/dunovank/jupyter-themes
安裝命令:
pip install jupyterthemes
安裝完后原押,直接cmd下,使用 jt -l 查看所有 themes偎血,使用 jt -t grade3 -T -N 啟用不同的themes诸衔。
重啟jupyter 生效
6、輸出PDF
a颇玷、安裝pandoc
https://github.com/jgm/pandoc/releases/tag/1.19.2.1
b笨农、安裝MiKTeX
c、安裝 GNU make for windows
http://gnuwin32.sourceforge.net/packages/make.htm
d帖渠、把上面安裝好的軟件路徑谒亦,全部添加到環(huán)境變量里面
e、PDF支持中文
C:\Python27\Lib\site-packages\nbconvert\templates\latex\article.tplx
把?\documentclass[11pt]{article} 修改為 ?\documentclass[11pt]{ctexart} 即可?战肌7菡小!
Pandoc 支持中文
pandoc infile.md -o outfile.pdf --latex-engine=xelatex -V mainfont="SimSun"
搬運(yùn)自http://www.cnblogs.com/McKean/p/6249112.html