Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guillaume-chevalier/058cf4886dbbe67e6950a64e79f8fb23 to your computer and use it in GitHub Desktop.
Save guillaume-chevalier/058cf4886dbbe67e6950a64e79f8fb23 to your computer and use it in GitHub Desktop.
Create python3 venv and register it to Jupyter Notebook as a python kernel
# This script will create a venv under as a `./venv` folder, and it will name it `my_new_venv_nickname_in_the_jupyter_menu` in jupyter's kernel list to choose the venv.
# You can edit the `./venv` path here to change it:
python3 -m venv ./venv
source ./venv/bin/activate
pip install --upgrade pip
pip install setuptools wheel
pip install ipykernel
# You can change the `my_new_venv_nickname_in_the_jupyter_menu` name in menu here:
ipython kernel install --user --name=my_new_venv_nickname_in_the_jupyter_menu
# Done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment