Managing Python Environments on Linux: Setup and Workflow with Miniconda

Miniconda Overview

Conda serves as an open-source package and environment management system, streamlining the installation and dependency management of software across various operating systems. While Anaconda offers a massive, pre-bundled suite of libraries suitable for data science, Miniconda provides a minimal footprint. It includes only Python and the conda command, allowing users to install precisely the dependencies required for specific projects. This approach minimizes system bloat and is preferred for Linux environments where resource efficiency is key.

Installation on Linux

To begin the setup, retrieve the latest Miniconda installer script. The following command utilizes wget to download the 64-bit Linux version for x86_64 architecture.

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda_installer.sh

Execute the downloaded script using bash. The interactive installer will guide you through the configuration process.

bash miniconda_installer.sh

Follow the on-screen prompts: review the license agreement and accept it. The installer will prompt you to initialize Conda; entering 'yes' appends the conda path to your .bashrc file, ensuring the command-line tools are available in new sessions. Finally, reload your shell configuration to apply the changes immediately.

source ~/.bashrc

Verify the installation by checking the installed version.

conda --version

Environment Management

Effective dependency management relies on isolated environments. The following workflow demonstrates how to control Python versions and associated packages.

Creating a New Environment

Specify a unique name and the desired Python version to generate a fresh, isolated workspace.

conda create -n data_ops python=3.9

Activating the Workspace

Enter the environment context before installing modules to ensure they are isolated from the system path.

conda activate data_ops

Installing Dependencies

Install the required libraries within the active environment. This example installs a common data processing stack.

conda install numpy pandas scipy

Listing Existing Environments

Inspect all currently created virtual environments to see what is available on the system.

conda env list

Removing an Environment

To clean up after a project is complete, delete a specific environment and all its associated files.

conda env remove -n data_ops

Exiting the Environment

Return to the system's default Python interpreter.

conda deactivate

Tags: Linux python conda miniconda environment-management

Posted on Fri, 05 Jun 2026 18:44:06 +0000 by CSB