Jupyter Notebook in a virtual environment (virtualenv)

Make sure you have virtualenv installed

pip install virtualenv

Create a virtual environment

Note: I like to use a . in front of my virtual environments so the folder is hidden.

virtualenv .venv

Get inside the environment

source .venv/bin/activate
. .venv/bin/activate
which python
> xxxxx/.venv/bin/python

Install a Jupyter kernel

This will install a kernel inside the environment, to use to run in the Jupyter notebook there:

ipython kernel install --user --name=.venv

Run Jupyter, and select the .venv kernel to run the notebook

jupyter notebook

--

--

Product Manager, Solution Architect, Entrepreneur, passionate about making sense of data.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Emmanuel

Emmanuel

52 Followers

Product Manager, Solution Architect, Entrepreneur, passionate about making sense of data.