Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
conda_tutorial/solutions.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
48 lines (30 sloc)
1.26 KB
This file contains 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
## Solutions for exercises to get familiar with `conda` | |
### 1. Create a `conda` environment | |
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` | |
### 4. Create `conda` environment from YAML file | |
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` |