Created
June 27, 2018 21:43
-
-
Save bdmorin/78a6c3e6992884d2064896f70c360617 to your computer and use it in GitHub Desktop.
virtualenv for jupyter
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 | |
# Yes you can do this in ansible | |
jdir = "~/jupyterLocal" | |
mkdir -p ${jdir} | |
pip install virtualenv | |
pip install virtualenvwrapper | |
TMPFILE=$(mktemp) | |
cat << EOF > ${TMPFILE} | |
export WORKON_HOME=$HOME/.virtualenvs | |
#export PROJECT_HOME=$HOME/Devel | |
export VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh | |
source /usr/local/bin/virtualenvwrapper_lazy.sh | |
EOF | |
source ${TMPFILE} | |
cat ${TMPFILE} >> ~/.zshrc | |
mkvirtualenv jupyterLocal -p python3 | |
workon jupyterLocal | |
PIPS=( | |
appnope | |
html5lib | |
ipykernel | |
ipython | |
ipython-genutils | |
jsonschema | |
jupyter-client | |
jupyter-contrib-core | |
jupyter-contrib-nbextensions | |
jupyter-core | |
jupyter-highlight-selected-word | |
jupyter-latex-envs | |
jupyter-nbextensions-configurator | |
jupyterlab | |
nbconvert | |
nbformat | |
notebook | |
numpy | |
matplotlib | |
pep8 | |
pyflakes | |
Pygments | |
python-dateutil | |
PyYAML | |
) | |
for P in ${PIPS} | |
do | |
pip install ${P} -U | |
done | |
echo "cd ${jdir}" >> $VIRTUAL_ENV/bin/postactivate | |
workon jupyterlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment