Created
May 18, 2019 13:48
-
-
Save ptantiku/cfafdc1e28e744b2559a122fd745e111 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to list all registered kernels
to remove kernel