Skip to content

Instantly share code, notes, and snippets.

@teologov
Last active September 10, 2020 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teologov/4562b62f434e51ba015bc97402dc8852 to your computer and use it in GitHub Desktop.
Save teologov/4562b62f434e51ba015bc97402dc8852 to your computer and use it in GitHub Desktop.
Conda commands
# create a new conda environment in ./cenv, aliased to ccreate
conda create --prefix ./cenv python
# remove the environment
conda env remove -p <full path to environment>
# activate the environment, aliased to cact
conda activate ./cenv
# install package, best to do from within the environment and allow defaults which is to install from conda repos
# for python just use package name, for r, prefix with r-
conda install <package name>
# deactivate, aliased to cdeact
conda deactivate
# export packages to requirements.txt file
conda list -e > requirements.txt
# build from requirements.txt file - this doesn't work with Miniconda for some reason so need to just do the package install manually
conda create -p ./cenv --file requirements.txt
// nonsense
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment