RSE: How to
  • Home
  • Virtual machine template
  • SSD notes
  1. Managing dependencies
  2. Basic dependencies in Python
  • Introduction
    • Course page
    • Introduction Slides
  • Basic Linux
    • Intro to Linux
    • Linux 101 slides
  • Managing dependencies
    • Basic dependencies in Python
    • Dependency slides
    • Conda skills
    • Figuring out dependencies for old code
  • Version control with git
    • Introduction to Version Control
    • Version control intro slides
    • Version control and Jupyter Notebooks

On this page

  • Package management for Python
    • Package management for other coding languages
  1. Managing dependencies
  2. Basic dependencies in Python

Dependencies 101

Very basic introduction to managing Python dependencies
Author

Maeve Murphy Quinlan

Published

February 18, 2025

Dependencies are the versions of different packages/modules that your code depends on, for example the version of Python you are using, and any libraries you have to import, like matplotlib, scipy, tensorflow etc.

Dependencies are an important thing to keep track of when building scientific code. How many different external libraries does your code depend on? What versions of these libraries does it need? How do you install and update these different libraries?

Launch fullscreen presentation ⤢

Package management for Python

In Python, there are lots of different ways to install and manage packages and dependencies. These different tools generally involve using virtual environments in order to keep the dependencies for different projects separate and tidy. Some package installation and management tools include:

  • Conda/Mamba
    • You can install conda with Miniforge
  • pip and Pipenv
  • pixi
  • Poetry
  • uv

You can read more about Python package management tool recommendations here. The package management tool you use will vary depending on whether you want to build your code into a package itself, or are relying primarily on external libraries. Some of these package managers include entire workflows for building and publishing Python packages, while others focus on organising pre-existing packages.

Package management for other coding languages

Note that I do not have as extensive experience managing projects, dependencies and packages in the following languages so please proceed with caution.

Package management in R

conda for R: you can install conda via Miniforge as linked above, and then install R packages through this following these instructions for R with conda.

renv: the reproducible environment package for R has some very nice introductory documentation.

Package management in Julia

Pkg: Pkg is Julia’s built-in package manager.

In research, a lot of people rely on conda: you can read more about perfecting your conda environment in this blog post.

Back to top

Citation

BibTeX citation:
@online{murphy_quinlan2025,
  author = {Murphy Quinlan, Maeve},
  title = {Dependencies 101},
  date = {2025-02-18},
  url = {https://murphyqm.github.io/research-software-dev/managing-dependencies/dependencies-intro.html},
  langid = {en}
}
For attribution, please cite this work as:
Murphy Quinlan, Maeve. 2025. “Dependencies 101.” February 18, 2025. https://murphyqm.github.io/research-software-dev/managing-dependencies/dependencies-intro.html.
Linux 101 slides
Dependency slides