Skip to content

Instantly share code, notes, and snippets.

@jsta
Last active September 28, 2020 19:23
Show Gist options
  • Save jsta/9b2871a8f3aebdf20cd9027dd98d1b2d to your computer and use it in GitHub Desktop.
Save jsta/9b2871a8f3aebdf20cd9027dd98d1b2d to your computer and use it in GitHub Desktop.
Setup a python environment with direnv
  1. Create an .envrc file:
export PATH=/home/<user>/anaconda3/bin:$PATH
# conda env create -n <env_name> -f environment.yml
source activate <env_name>
  1. Create an environment.yml file:
name: <env_name>
channels:
- conda-forge
dependencies:
        - python=3.8.2
        - <packages>
  1. Activate direnv

  2. Reload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment