conda cheat sheet

最近在使用anaconda,抄了一下cheat sheet:

Conda basics

statement command
Verify conda is installed, check version number conda info
Update conda to the current version conda update conda
Install a package included in Anaconda conda install PACKAGENAME
Run a package after install, example Spyder* spyder
Update any installed program conda update PACKAGENAME
Command line help COMMANDNAME –help conda install –help

Using environments

statement command
Create a new environment named py35, install Python 3.5 conda create –name py35 python=3.5
Activate the new environment to use it WINDOWS: activate py35
LINUX, macOS: source activate py35
Get a list of all my environments, active environment is shown with * conda env list
Make exact copy of an environment conda create –clone py35 –name py35-2
List all packages and versions installed in active environment conda list
List the history of each change to the current environment conda list –revisions
Restore environment to a previous revision conda install –revision 2
Save environment to a text file conda list –explicit > bio-env.txt
Delete an environment and everything in it conda env remove –name bio-env
Deactivate the current environment WINDOWS: deactivate
macOS, LINUX: source deactivate
Create environment from a text file conda env create – le bio-env.txt
Stack commands: create a new environment, name and install the biopython package conda create –name bio-env biopython it bio-env

Finding conda packages

statement command
Use conda to search for a package conda search PACKAGENAME
See list of all packages in Anaconda https://docs.anaconda.com/anaconda/packages/pkg-docs