Created
September 14, 2019 15:35
-
-
Save evu/6c909c8a851d8c8a3ccee0ca76e9ad25 to your computer and use it in GitHub Desktop.
Add jupyter kernel for a virtualenv
This file contains hidden or 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 | |
# | |
# Adds a jupyter kernel for a virtualenv | |
# This makes the virtualenv available for use in a Jupyter notebook | |
# Run this from the directory containing your virtualenv directory and | |
# pass it the directory name for your virtualenv. | |
# | |
# Usage: | |
# $ ./add_jupyter_kernel.sh myvenv | |
# | |
echo "Kernel name: $1" | |
source $1/bin/activate | |
echo "Using pip: $(which pip)" | |
pip install ipykernel | |
ipython kernel install --user --name="$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment