Conda is a general-purpose package and environment management system that allows to install, run, and update packages and their dependencies very efficiently. Besides, creating an environment using conda or miniconda in remote computer will enable one to install and manage softwares without need of sudo power. I usually create one conda environment for one research project, similar concept as creating a Rproject - if you are familiar to R programming, so that I can generate a summary file listing all the packages and their version used for a project or analyses.
Frequently used techniques to manage conda environment.
# Verify conda is installed conda info # Update conda package an denvironment conda updata conda
Managing conda environments
# Create a new conda environment and install programs conda create -y --name tnseqP python=3.6 # here tnseqP is the name of virtual environment, along with specific version of python conda install -y --name tnseqP django=2.0.2 conda install -y --name tnseqP -c bioconda -c conda-forge anvio=5.0 diamond bwa # Activate new environment source activate tnseqP # Installing additional packages to the new virtual environment conda install -n tnseqP numpy=1.15 # Deactivate the virtual environment source deactivate # List the conda environments conda env list conda info --envs # Make exact clone of an environment conda create -n tnseqP --clone newtnseqP
Managing packages within a conda environment
# List the programs installed with a conda environment. conda list # Search for a package available within a conda environment conda search numpy # Install a new package conda install -n tnseqP pandas # Update a package in the current environment conda update pandas # Install a package from a specific channel conda install -c bioconda bwa
Removing packages or environments
# Removing a virtual environment conda remove -n tnseqP -all # Remove one package from the active environment conda remove pandas