Using Version Managers for Your Tools
Table of Contents
Avoid installing stand-alone packages for tools and programming languages. Instead, use version managers. These enable you to use the correct version of the required tools and dependencies for each of your projects. A version manager can download all of the versions of a product that your projects need and switch the active version as you move between projects, as well as letting you set a default version.
Each popular programming language has a specialized version manager. Alternatively, you can use mise-en-place (mise), which supports wide range of popular programming languages and tools. This means that you can set the expected versions of all of the languages and tools for a project through a single mise configuration file.
Avoid using mise for projects that have strict requirements about reproducible environments or the software supply chain. By design, mise can download and install a very wide range of software, and it will connect to multiple services on the public Internet, including GitHub.
Specialized Version Managers #
Version Managers for Programming Languages #
These are popular specialized version managers for programming languages:
- The standard go tool manages versions of Go.
- jEnv for Java
- fnm and nvm for Node.js
- pyenv for Python
- rustup for Rust
See the section on Python for more details about using version managers with Python.
If you are a Ruby developer, you may already use mise. The Ruby on Rails Guides now recommend mise for Rails projects.
Some packages for JavaScript, Python and Ruby use Rust or C code. To support these packages, you may need to install a compiler.
tenv: Version Manager for Terraform and OpenTofu #
If you decide not to use mise, consider using tenv to install versions of OpenTofu and Terraform. The tenv version manager also supports Atmos and Terragrunt.
Install cosign on systems that use tenv. OpenTofu binaries are then verified with cosign when tenv downloads them.
Setting Up Version Managers on Developer Systems #
Consider using Homebrew to install version manager tools on your development systems for macOS and Linux. Homebrew enables you to update the version managers and other development tools on the system with minimal effort.
WinGet and Scoop provide equivalents of Homebrew for Microsoft Windows. If you use Microsoft Windows, check the documentation of a version manager before you install it. Some version managers only support UNIX-based systems, or have features that cannot work on Microsoft Windows.
Homebrew can install all of the popular version manager tools. For example, to install the rustup version manager for Rust and the pyenv version manager for Python, run these commands in a terminal window:
brew install pyenv rustup
You can also use Homebrew to install other tools that version managers work with. For example, we should install cosign on systems that use tenv. If cosign is present, tenv automatically uses it to carry out signature verification on the OpenTofu binaries that it downloads. This command uses Homebrew to install both tenv and cosign:
brew install tenv cosign
Avoid using Homebrew itself to install programming languages. Homebrew has limited support for working with multiple versions of the same programming language.
Extra Requirements for Version Managers #
When you use any version manager for Python, JavaScript or Ruby, you may also need to install compiler tools for the C programming language. Packages for interpreted languages use components that are written in C or Rust. Python tools fetch compiled versions of these components when they are available. For other cases, you need to have a compiler on your own system to build working components from the source code.
To install a Rust compiler on a system, use mise or the rustup version manager. Linux distributions provide packages for Rust, but these are usually not the latest versions.
To install a C compiler on macOS, use the Command-line Tools package for Xcode. On Linux, use the system package manager to install a C compiler. Use the GCC compiler, because components may not be tested with other compilers.
Run this command to install GCC and other C compiler tools on Debian-based distributions, such as Ubuntu:
sudo apt install build-essential
Run this command to install just GCC on Red Hat-based distributions, such as Fedora:
sudo dnf install gcc
Updating Version Managers #
Update your version managers regularly. This ensures that they can access the latest versions of the tools that they manage.
If you install version managers with Homebrew, you can update all of the version managers and other tools that you use at the same time, rather than needing to upgrade each one separately. These commands will upgrade all of the tools that Homebrew manages:
brew update
brew upgrade
Version Managers and Python #
You should use a project tool to develop your Python projects, such as uv or Poetry. These manage Python virtual environments for you, and also offer the ability to manage the versions of Python. I would currently recommend that you use pyenv or mise to install versions of Python, rather than using the features in project tools.
You can enable current versions of mise to integrate with uv, so that there are no conflicts between the tools.
Installing Python with a Version Manager #
Whichever tool that you use to install Python, ensure that it compiles each version of Python that it installs, rather than using standalone builds. These standalone builds are modified versions of Python that are maintained by Astral, not the Python project.
The pyenv tool automatically compiles Python. You must change the mise configuration to use compilation rather than standalone builds. Both pyenv and mise use python-build to compile Python.
Only use the Python installation features of uv, PDM and Hatch for experimental projects. These project tools always download the third-party standalone builds of Python when a user requests a Python version that is not already installed on the system.
Version Managers and Python Virtual Environments #
If you are not using a project tool, you can use your version manager to handle Python virtual environments. Both pyenv and mise support automatic switching between Python virtual environments. Support for creating and switching between virtual environments is built-in to mise. The pyenv version manager supports virtual environments with the virtualenv plugin.