XClose

Research Software Engineering Summer School

Home
Menu

Working with Environments

Virtual environments ensure that your code and the dependencies are installed in a locally isolated place, such that the code is reproducible (for instance, when filing bug reports) and the correct versions of dependencies are installed every time.

Environment solutions by different languages

Different languages offer different solutions for virtual environment management, including standard tools, third-party tools, and environment configuration/metadata format.

  • Python
    • venv: the barebones implementation for a virtual environment, included in python's standard library
    • virtualenv: Virtual Python Environment builder
    • tox: virtualenv management and test automation command line tool
    • nox: command-line tool that automates testing in multiple Python environments
    • Pipenv: Python dev workflow for humans
    • uv: an extremely fast Python package and project manager
    • conda: powerful command line tool for package and environment management
    • Several Python build-backends offer frontend utilities and dependency management options:
      • Poetry: Python packaging and dependency management made easy
      • Hatch: a modern, extensible Python project manager
  • Julia
    • Pkg: Julia's builtin package and environment manager
  • R
    • renv: reproducible environments for your R projects
    • conda: powerful command line tool for package and environment management
  • Rust
    • Cargo: the Rust package manager

We will go through venv, uv, and conda in this course. Further we will have a short demonstration of docker and also briefly introduce a few other tools.

The Reproducible development environment epsiode in Software Carpentries' Tools and good software practices for open and reproducible research lesson is a great introduction to virtual environments and venv for Python.