Skip to content

Instantly share code, notes, and snippets.

@ArnoutDevos
Created October 10, 2018 16:29
Show Gist options
  • Save ArnoutDevos/0670249b6090cddce202a015945fba16 to your computer and use it in GitHub Desktop.
Save ArnoutDevos/0670249b6090cddce202a015945fba16 to your computer and use it in GitHub Desktop.
Create conda virtual environment and add it to jupyter
# Inspiration from
# https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/20/conda/
# and
# https://stackoverflow.com/questions/39604271/conda-environments-not-showing-up-in-jupyter-notebook
# Check if conda is up to date
conda update conda
# Create a virtual environment for your project
conda create -n myenv python=x.x anaconda
# Activate your newly created virtual environment
source activate myenv
# Create an iPython kernel for jupyter
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
# Installing packages inside your virtualenvironment
conda install -n myenv [package]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment