
Category: Uncategorized
Jupyter-Sphinx Tool Chain
You can create a tool chain that allows you to author documents in Jupyter notebooks and publish with Sphinx.
To Install:
- Python 3.6 (programming language environment used to run Sphinx and Jupyter). I recommend that you grab Anaconda Python 3.6. It’s big, but it will save us some steps by virtue of its large out-of-the-box module library. It already contains Jupyter, which will be a big part of our conversation. Be sure it falls on your path before any existing Python with
which python(Mac/Linux) orwhere python(Windows). - Sphinx (html site builder). With Python above installed, install Sphinx as a Python module with
pip install -U Sphinx.-Uwill update the module if it already exists.) - Install [Pandoc]((https://github.com/jgm/pandoc/releases) . Ensure
pandocis on your system path withwhich pandoc(Mac/Linux) orwhere pandoc(Windows). - Run
pip install nbsphinx sphinx-bootstrap-themeto install some useful modules.
To start using Jupyter Notebook:
- Open another terminal.
- Change directory to you Sphinx root.
- Run Jupyter notebook with
jupyter notebook. - It will launch a browser page with Jupyter.
To Run Sphinx:
make htmlcd build/htmlpython -m http.server- Access the generated doc with a browser at http://localhost:8000