use iPython notebook with virtualenv

It is possible to use ipython notebook inside a virtual environment. To do that, it is necessary to create a new ipython kernel and link it with the virtual environment.

  • Create virtualenv
  • mkvirtualenv my_test

    If the virtualenv my_test has been created before

  • workon my_test
  • Install the ipython kernel module into your virtualenv

  • pip install ipython[notebook]

    or use this

  • pip install ipykernel
  • Now run the kernel “self-install” script:
    python -m ipykernel install --user --name=my_test
use iPython notebook with virtualenv