zoukankan      html  css  js  c++  java
  • IPython与Jupyter notebook 安装与配置,插件扩展,主题,PDF输出

    基于 python2.7.13 32-bit版本安装

    1、安装pyreadline

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

    下载对应的32位版本

     安装Microsoft Visual C++ Compiler for Python 2.7 并安装

    http://www.microsoft.com/en-us/download/details.aspx?id=44266

    2、用pip安装iPython

    进入目录 c:Python27Scripts>

    输入命令: pip install ipython

    2.1 或者从git安装iPython

    https://github.com/ipython/ipython.git

    把ipython.git pull 下来,checkout 到5.1分支(适用于Python2.7)。

    使用cmd进入ipython目录,输入 python setup.py install 即可

    检查iPython是否安装成功

    命令行输入 ipython 即可进入ipython

    命令行输入 ipython --pylab 

    ipython会自动importSciPy,NumPy和matplotlib包,也就是不需要在命令输入 from numpy import * 等命令

    3、安装notebook

    pip install jupyter 

    安装成功后,命令行输入:

    jupyter notebook

     http://localhost:8888/ 检查notebook服务器是否已经启动

     4、查看已安装的包

    pip list

    5、安装扩展

    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

    运行Jupyter Notebook, 在打开的Notebook界面里, 你会发现多了一个Nbextensions,勾选Table of Contents (有的版本是toc2). 然后创建或者打开一个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

    https://miktex.org/download

     c、安装 GNU make for windows

    http://gnuwin32.sourceforge.net/packages/make.htm

     d、把上面安装好的软件路径,全部添加到环境变量里面

     e、PDF支持中文

     C:Python27Libsite-packages bconvert emplateslatexarticle.tplx

     把 documentclass[11pt]{article} 修改为  documentclass[11pt]{ctexart} 即可!!!

    Pandoc 支持中文

    pandoc infile.md -o outfile.pdf --latex-engine=xelatex -V mainfont="SimSun"

  • 相关阅读:
    UVA 10608 Friends
    UVA 10806 Dijkstra, Dijkstra.
    HDU 3715 Go Deeper
    poj1315
    poj1383
    poj1650
    poj1265
    poj1523
    RedHat9.0虚拟机安装
    注册DirectShow filter时应该注意中文路径
  • 原文地址:https://www.cnblogs.com/McKean/p/6249112.html