Managing Development Environments with conda, nvm, and rustup
Modern development often requires more than just installing one language runtime globally and calling it a day. Installing everything system-wide quickly becomes messy, hard to reproduce, and annoying to debug. This is where command-line environment and toolchain managers come in. Three important examples are:
condafor Python-centric environments and mixed native dependenciesnvmfor Node.js versionsrustupfor Rust toolchains
These tools all help developers install, manage, and switch between multiple development environments without constantly modifying the system-wide setup.
Conda
conda is strongest when your environment includes more than pure Python packages. It can manage:
- Python itself
- Python libraries
- native libraries
- command-line tools
- GPU-related packages such as CUDA stacks
That makes it especially practical for data science, machine learning, and scientific computing.
Install Miniconda
A lightweight way to start is Miniconda.
Create an installation directory:
1 | |
Download the installer:
- Linux x86_64:
1
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh - macOS arm64:
1
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh - macOS x86_64:
1
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh
Run the installer:
1 | |
Activate conda in the current shell:
1 | |
Initialize shell integration if desired:
1 | |
Reverse that change if needed:
1 | |
Common Conda Commands
Create an environment:
1 | |
Activate it:
1 | |
Install packages:
1 | |
List environments:
1 | |
Export the environment:
1 | |
Recreate it elsewhere:
1 | |
Remove an environment:
1 | |
nvm
nvm stands for Node Version Manager. Its job is simple and extremely useful: it lets you install multiple Node.js versions and switch between them from the shell. This matters because JavaScript projects often depend on a specific Node major version. One project may want Node 18 LTS, while another may require Node 22.
Install nvm
Install from the official script:
1 | |
Then load it into the current shell. Depending on your shell configuration, you may need:
1 | |
After that, verify installation:
1 | |
Common nvm Commands
Install the latest LTS Node.js:
1 | |
Install a specific version:
1 | |
List installed versions:
1 | |
Switch versions in the current shell:
1 | |
Set a default version:
1 | |
Remove an installed version:
1 | |
Project-Level Use with .nvmrc
A common pattern is to put the desired Node version in a file named .nvmrc:
1 | |
Then, inside that project directory, run:
1 | |
This makes it easy to align a project with its expected Node version.
rustup
rustup is the official Rust toolchain manager. It installs and manages:
- Rust compiler toolchains
- channels such as
stable,beta, andnightly - components like
rustfmtandclippy - additional targets for cross-compilation
Compared with nvm, rustup is more than a version switcher. It is a full toolchain management layer for Rust development.
Install rustup
Install from the official script:
1 | |
Load the Rust environment into the current shell:
1 | |
Verify installation:
1 | |
Common rustup Commands
Install toolchains:
1 | |
List installed toolchains:
1 | |
Set the global default:
1 | |
Override the toolchain inside a specific project directory:
1 | |
Remove a toolchain:
1 | |
Add common components:
1 | |
Add a compilation target:
1 | |
Project-Level Use with rust-toolchain.toml
Rust projects often pin a toolchain using rust-toolchain.toml, for example:
1 | |
This gives the project an explicit, reproducible toolchain specification.