Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ptantiku/cfafdc1e28e744b2559a122fd745e111 to your computer and use it in GitHub Desktop.
Save ptantiku/cfafdc1e28e744b2559a122fd745e111 to your computer and use it in GitHub Desktop.
#!/bin/bash
export project=PROJECT_NAME_HERE
# create project folder
mkdir $project
cd $project
# setup virtual environment
python -m venv .venv
# old way, python < 3.6:
# pip install virtualenv; virtualenv .venv
# now we got folder $project/.venv
# use the virtual env
source .venv/bin/activate
# or on windows:
# .venv/Lib/activate.bat
# set up kernel for Jupyter for this virtual env
# run the following commands under the virtual env
pip install ipykernel
ipython kernel install --user --name=$project
# now it's ready, run jupyter [lab|notebook] and then "change the kernel" on the page
@ptantiku
Copy link
Author

to list all registered kernels

jupyter kernelspec list 

to remove kernel

jupyter kernel remove [name]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment