Created
April 6, 2017 10:22
-
-
Save garymacindoe/ed36e5f3fe12153ffa2ced58c9ea5a70 to your computer and use it in GitHub Desktop.
Pre/post scripts for virtualenvwrapper to enable jupyter notebook integration for virtualenvs
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 | |
# This hook is sourced after a new virtualenv is activated. | |
pip install ipykernel | |
python -m ipykernel install --user --name $(basename ${VIRTUAL_ENV}) --display-name "$(basename ${VIRTUAL_ENV})" |
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 | |
# This hook is run before a virtualenv is deleted. | |
# argument: full path to environment directory | |
[[ -d "${1}" ]] && rm -rf "${HOME}/Library/Jupyter/kernels/${1}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment