Jupyter Notebook

https://jupyter-notebook.readthedocs.io/en/latest/

Table of Contents

How IPython and Jupyter Notebook work discussion

Exporting notebooks to other formats
Exporting notebooks to other formats

Can I import packages installed in a virtualenv? discussion

The Jupyter Notebook and other frontends automatically ensure that the IPython kernel is available. However, if you want to use a kernel with a different version of Python, or in a virtualenv or conda environment, you’ll need to install that manually.

If you want to use multiple python kernels placed in different virtualenvs, you should do following steps:

/path/to/kernel/env/bin/python -m ipykernel install --prefix=/path/to/jupyter/env --name 'python-my-env'

For example, when running ipykernel:

$ python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
Installed kernelspec myenv in /Users/yeonghoey/Library/Jupyter/kernels/myenv
$ vim '/Users/yeonghoey/Library/Jupyter/kernels/myenv/kernel.json'
kernel.json
{
  "argv": [
    "/Users/yeonghoey/.local/share/virtualenvs/play-jupyter-dKLmjL4I/bin/python",
    "-m",
    "ipykernel_launcher",
    "-f",
    "{connection_file}"
  ],
  "display_name": "Python (myenv)",
  "language": "python"
}

Configurations reference