Skip to content

Instantly share code, notes, and snippets.

@gwerbin
Last active October 10, 2018 18:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwerbin/64b1f3ad601e1c21916d70cbbeb71bbc to your computer and use it in GitHub Desktop.
Save gwerbin/64b1f3ad601e1c21916d70cbbeb71bbc to your computer and use it in GitHub Desktop.
Jupyter Conda setup
# Windows instructions are analogous
## Global Jupyter install
conda create -n jupyter python jupyter
echo "alias jupyter-global=/opt/anaconda/envs/jupyter/bin/jupyter" >> ~/.bashrc
## Standard project setup
cd ~/projects # where i keep all my work
mkdir new-project
cd new-project
git init
echo "conda-env/" >> .gitignore
conda create -p ./conda-env python=3.6 ipykernel r rpy2
conda activate ./conda-env
python -m ipykernel --user --name=project__my-project__py36 --display-name="[project] My Project (Python 3.6)"
## Use in the Jupyter console -- I usually just use the local IPython instead
jupyter-global console --kernel=project__my-project__py36
## Use in the Jupyter notebook
jupyter-global notebook
# You should now be able to access the "[project] My Project (Python 3.6)" kernel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment