Skip to content

Example: Create and Use Biopython Environment with Conda

Using conda to create an environment that uses the biopython package

To use Conda you must first load the anaconda module:

module load conda

Create an empty conda environment to install biopython:

conda-env-mod create -n biopython

Now activate the biopython environment:

module load use.own
module load conda-env/biopython-py3.12.5

Install the biopython packages in your environment:

1
2
3
4
5
6
conda install --channel anaconda biopython -y
Fetching package metadata ..........
Solving package specifications .........
.......
Linking packages ...
[    COMPLETE    ]|################################################################

The --channel option specifies that it searches the anaconda channel for the biopython package. The -y argument is optional and allows you to skip the installation prompt. A list of packages will be displayed as they are installed.

Remember to add the following lines to your job submission script to use the custom environment in your jobs:

1
2
3
module load conda
module load use.own
module load conda-env/biopython-py3.12.5

If you need further help or run into any issues with creating environments, contact us or drop by a coffee hour session for in-person help.

For more information about Python:

Back to Python