Back

Talking about virtual environments

In every programming language, a virtual environment

8

1. 👨‍🏫 Introduction

When working on development projects, especially when dealing with multiple technologies or different versions, having a virtual environment is essential. This environment allows you to run code in isolation, ensuring that changes made do not affect other projects or global dependencies.

In this tutorial, you will learn which tools to use to manage virtual environments in four popular programming languages:

2. Installing a Virtual Environment in Java

In Java, one of the most recommended virtual environments is SDKMan, a tool that simplifies the installation and management of multiple versions of Java and other SDKs.

2.1. Alternatives to SDKMan

3. Installing a Virtual Environment in JavaScript

In the JavaScript ecosystem, the most widely used virtual environment—and the one I personally use—is NVM, a tool that makes it easy to manage multiple versions of Node.js. With NVM, you can switch between Node versions based on your project’s needs.

3.1. Alternatives to NVM

4. Installing a Virtual Environment in PHP

In PHP, version management is handled differently. There is no dedicated virtual environment tool, but you can manage PHP versions through packages via a PPA (Personal Package Archive). Personally, I use the Ondrej PPA, which allows installing and switching between multiple PHP versions on an Ubuntu system.

5. Installing a Virtual Environment in Python

For Python, the most commonly used virtual environment tool is Pyenv, which allows managing different Python versions. Pyenv simplifies the installation of specific versions for each project, ensuring no dependency conflicts.

5.1. Alternatives to Pyenv

6. Observations

Although I don’t use tools like FNM or UV in my workflow, I find them very interesting. Additionally, something curious is that both UV and FNM are written in Rust 🤔, which contributes to their high efficiency 🚀.

It will be interesting to see other compilers and tools being developed using Rust…

Other notable projects that are using Rust include: