Skip to main content

Getting Started with Miniconda

Python Environments

Getting Started with Miniconda

A beginner-friendly guide to Conda environments, isolated project setups, and the small workflow that prevents package conflicts from spilling across your Python projects.

MiniConda Series

Main problem

Different projects often need different Python versions and different package versions.

Main fix

Create one isolated Conda environment per project.

Main habit

Do not do real project work in the base environment.

Why it matters

If you have ever installed a package for one Python project and accidentally affected another, you have already met the problem Miniconda helps solve.

Miniconda gives you a clean way to isolate projects so dependencies stop interfering with each other.

The basic idea Keep each project in its own environment so Python, packages, and dependency decisions stay local to that project.
Foundations

What Is Miniconda?

Miniconda is a minimal Conda installation. It includes Conda, Python, and a small set of core dependencies.

Unlike Anaconda, which installs a much larger package collection up front, Miniconda starts smaller and lets you add only what you actually need.

Why that is useful A smaller starting point usually means less clutter, more control, and a setup that stays closer to what each project really needs.
Core idea

What Is a Conda Environment?

A Conda environment is an isolated workspace for a project.

Each environment can have its own:

  • Python version
  • packages
  • dependency graph
Project A
Python 3.10
numpy 1.26

Project B
Python 3.8
numpy 1.21

Both environments can live on the same machine without stepping on each other.

The simplest rule to remember Create one environment per project.
Install

Installing Miniconda

Installation changes slightly by operating system and CPU architecture.

macOS (Intel)

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh

macOS (Apple Silicon)

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh
bash Miniconda3-latest-MacOSX-arm64.sh

Linux

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

Windows

Download the Miniconda installer and run it through the normal installer flow.

Important Windows note Do not manually force Miniconda into PATH unless you have a specific reason. The safer beginner path is to use the normal Conda initialization flow or Anaconda Prompt.

After installation, open a new terminal and verify that Conda is available:

conda --version
Workflow

The Basic Conda Workflow

  1. Create an environment
  2. Activate it
  3. Install packages inside it
  4. Do your work
  5. Export the environment if you need to recreate or share it later
conda create --name project1 python=3.10
conda activate project1
conda install numpy pandas
conda export --from-history --file environment.yml
Create

Creating an Environment

It is a good habit to specify the Python version when you create the environment.

conda create --name myenv python=3.10

Example:

conda create --name data-analysis python=3.11
Activate

Activating and Deactivating Environments

Activate an environment:

conda activate myenv

Your prompt will usually change to show the active environment:

(base) user@computer % conda activate myenv
(myenv) user@computer %

Deactivate it with:

conda deactivate
Packages

Installing Packages

Install packages inside the active environment.

conda install numpy pandas matplotlib

Conda will resolve dependencies for you.

If a package is not available through Conda

You can use pip inside the environment:

pip install somepackage
Rule of thumb Use Conda first. Use pip only when necessary.
Maintain

Listing and Removing Environments

List environments:

conda env list

Remove an environment:

conda env remove --name myenv
Share

Exporting and Recreating Environments

If you want to share an environment or rebuild it later, export it to a file.

Recommended for new projects

conda export --from-history --file environment.yml

This keeps the file cleaner by recording the packages you explicitly asked for rather than every fully resolved package in the environment.

Still supported

conda env export > environment.yml

This remains valid, but it often produces a fuller environment snapshot than beginners actually want.

Recreate the environment

conda env create -f environment.yml
Mistakes

Common Beginner Mistakes

Installing project packages in base

The base environment is not the place for normal project dependencies. Create a dedicated environment instead.

Forgetting to activate the environment

If the environment is not active, packages may install somewhere you did not intend.

Mixing pip and Conda randomly

This is one of the fastest ways to make environments harder to reproduce.

Reference

Useful Commands

Task Command
Check Conda version conda --version
Create environment conda create --name myenv python=3.10
Activate environment conda activate myenv
Deactivate environment conda deactivate
Install packages conda install numpy pandas
List environments conda env list
Export environment conda export --from-history --file environment.yml
Recreate environment conda env create -f environment.yml
Remove environment conda env remove --name myenv
Quick start

A Small Cheat Sheet

conda create --name myenv python=3.10
conda activate myenv
conda install numpy pandas
conda export --from-history --file environment.yml
conda deactivate
FAQ

Frequently Asked Questions

These are the practical questions beginners usually have when starting with Miniconda.

What is the difference between Conda and Miniconda?

Conda is the package and environment manager. Miniconda is the minimal installer that gives you Conda plus Python and core dependencies.

Is Miniconda better than Anaconda?

It is usually the better fit when you want a smaller install and tighter control over what gets added to your machine.

Should I use pip or Conda?

Use Conda first. Use pip only when the package is not available through Conda.

Why avoid the base environment for projects?

Because project dependencies pile up there quickly and make it easier for unrelated work to interfere with each other.

Why specify the Python version when creating an environment?

Because it makes the environment more predictable and easier to reproduce later.

What is the benefit of conda export --from-history?

It keeps the environment file cleaner by recording what you explicitly asked for instead of every fully resolved dependency.

Can Conda manage more than Python packages?

Yes. Conda can also manage some non-Python dependencies, which is one reason it is useful for scientific and cross-language environments.

What is the simplest beginner habit to keep?

Create one environment per project and activate it before doing any real work.

Conclusion

The core Miniconda workflow is simple: create one environment per project, choose the Python version explicitly, install packages inside that environment, and export the environment when you need to share or rebuild it.

Once that habit becomes normal, dependency conflicts become much easier to control.

Raell Dottin

Comments