Skip to content

Instantly share code, notes, and snippets.

@gabriel19913
Forked from pratos/condaenv.txt
Created May 24, 2019 16:50
Show Gist options
  • Save gabriel19913/7beb82e78094ec5fbd6c9698d428912c to your computer and use it in GitHub Desktop.
Save gabriel19913/7beb82e78094ec5fbd6c9698d428912c to your computer and use it in GitHub Desktop.
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
#To export environment file
activate <environment-name>
conda env export > <environment-name>.yml
#For other person to use the environment
conda env create -f <environment-name>.yml
# For Windows users
@gabriel19913
Copy link
Author

#Remove conda environments
conda env remove -n <env_name>

Duplicate conda environments
conda create --name <clone_name> --clone <env_name>

#List Conda environments
conda env list

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