Skip to content

Instantly share code, notes, and snippets.

@bofm
Created April 20, 2017 15:24
Show Gist options
  • Save bofm/5534a5371e7230732465357cc9216fc3 to your computer and use it in GitHub Desktop.
Save bofm/5534a5371e7230732465357cc9216fc3 to your computer and use it in GitHub Desktop.
Use virtualenv python kernel inside the Jupyter Notebook installed in the system site-packages
# install Jupyter Notebook into system site-packages
pip install -U notebook
# create a virtualenv and use the Jupyter from the system site-packages
mkvirtualenv --system-site-packages myvenv
# the virtualenv is now activated
pip install ipykernel
VM_NAME=myvm python -m ipykernel install --user --name $VM_NAME --display-name $VM_NAME
python -m jupyter notebook
# In the browser: New -> select kernel "myvm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment