Fundamentals 6 min read

Creating a Reproducible Linux Development Setup with VS Code, Conda, and NVM

The guide explains how to set up a reproducible, system‑clean Linux development environment by installing VS Code as a universal editor, managing Python with Miniconda or venv, handling Node.js via NVM, and adding C/C++ and Java toolchains, all with concrete commands and best‑practice tips.

Ubuntu
Ubuntu
Ubuntu
Creating a Reproducible Linux Development Setup with VS Code, Conda, and NVM

1. Universal Editor – Visual Studio Code

VS Code is preferred for large projects over Vim. Download the .deb from https://code.visualstudio.com and install with sudo dpkg -i code_*.deb. Recommended extensions: Chinese (Simplified) language pack, Remote‑SSH, Prettier. VS Codium is an open‑source alternative but the official build provides the most complete ecosystem.

2. Python Environment Management

Ubuntu includes Python 3, but installing packages with sudo pip on the system interpreter corrupts system dependencies. Use a virtual‑environment manager.

Option 1 – Miniconda (recommended)

Download the Miniconda installer for Linux 64‑bit.

Run the installer: bash Miniconda3-latest-Linux-x86_64.sh.

Typical commands:

conda create -n myenv python=3.9   # create environment
conda activate myenv                # activate
conda install numpy                  # install package

Option 2 – venv (built‑in)

Install the python3-venv package, create a virtual environment, and activate it:

sudo apt install python3-venv
python3 -m venv myenv
source myenv/bin/activate

A common workflow for a project:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
pip install -r requirements.txt

For occasional command‑line tools such as httpie or cookiecutter, pipx can install them in isolated environments without affecting the system or project interpreter.

3. Node.js Environment – NVM

Installing Node.js via apt install nodejs yields an outdated version and requires manual permission handling. NVM (Node Version Manager) provides version isolation.

Install NVM:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

Restart the terminal.

Install the latest LTS Node.js and activate it:

nvm install --lts   # install latest LTS
nvm use --lts

Optional: switch npm registry to a faster mirror:

npm config set registry https://registry.npmmirror.com

If a corporate or campus network blocks TLS or requires a proxy, configure the proxy according to organizational policies instead of using unofficial scripts.

4. C/C++ Build Environment

Ubuntu does not ship a compiler by default. Install the build-essential meta‑package, which provides gcc, g++, make, and related tools, together with gdb for debugging:

sudo apt update
sudo apt install build-essential gdb

Verify the installation:

gcc --version
make --version

5. Java Environment

For Java development or running Minecraft servers, install OpenJDK 17 (or alternative versions such as 21 or 8): sudo apt install openjdk-17-jdk # or 21, 8 Multiple Java versions can be switched with update-alternatives.

Store configuration files, dotfiles, scripts, and package mirrors in a Git repository; cloning the repository on a new machine reproduces the same environment.

Reference:

https://code.visualstudio.com
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

PythonLinuxDevelopment EnvironmentNVMVS CodeConda
Ubuntu
Written by

Ubuntu

Focused on Ubuntu/Linux tech sharing, offering the latest news, practical tools, beginner tutorials, and problem solutions. Connecting open-source enthusiasts to build a Linux learning community. Join our QQ group or channel for discussion!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.