Last active
September 10, 2020 12:51
-
-
Save teologov/4562b62f434e51ba015bc97402dc8852 to your computer and use it in GitHub Desktop.
Conda commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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