conda
Solutions for exercises to get familiar with conda
environment
1. Create a Create a conda
environment named codeclub
that runs python version 3.8
and activate the environment.
Solution: conda create -n codeclub python=3.8
conda activate codeclub
2. Install packages
Install any version of numpy
using the pip
command and the latest version
of fastqc
using conda
. (Hint: You might need a specific channel here and you can search for it.)
Solution: pip install numpy
conda search -c bioconda fastqc
conda install -c bioconda fastqc=0.11.9
3. Save your environment to file
Export your environment to a YAML file and remove your environment.
Solution: conda env export >> codeclub.yml
conda deactivate
conda env remove -n codeclub
conda
environment from YAML file
4. Create Use the YAML file to create a new conda
environment
and activate the environment.
Solution: conda env create -f codeclub.yml
conda activate codeclub
5. Uninstall packages
Uninstall numpy
and fastqc
from the newly created environment.
Solution: pip uninstall numpy
conda uninstall fastqc
6. Remove environment
Remove the environment you created from the YAML file.
Solution: conda deactivate
conda env remove -n codeclub