Back to Article List

How to create and manage Miniconda environments

How to create and manage Miniconda environments

Everything useful you do with Miniconda happens inside environments. The installer ships little beyond conda and one Python on purpose: the intended workflow is an isolated environment per project, each with its own pinned interpreter, so one project's dependencies never leak into the next. This guide runs through that lifecycle on a standard install in ~/miniconda3. No install yet? The guide to install Miniconda on Ubuntu gets you there first.

Create an environment with conda create

Every project starts here:

conda create -n myproject python=3.12

-n names the environment, and the python=3.12 part shouldn't be treated as optional. A bare conda create -n myproject produces an environment with no Python in it at all, which catches nearly everyone once. The pin also carries the reproducibility: six months on, on another machine, the same command builds the same interpreter instead of whatever was newest that day. (Sometimes the pin points backward, python=3.11 for a dependency that hasn't caught up, and that situation comes up more often than library changelogs admit.)

Conda prints its plan and asks for confirmation before doing anything. -y skips the prompt, which scripts want and interactive fingers eventually regret.

Activate and deactivate the environment

Nothing you created is in use until you activate it:

conda activate myproject

The prompt prefix changes from (base) to (myproject), and which python now answers with ~/miniconda3/envs/myproject/bin/python. I've gotten into the habit of running that path check before any pip install, just to confirm I'm where I think I am. conda deactivate drops you back to base when you're done.

Your idea deserves better hosting

24/7 support 30-day money-back guaranteeRefund covers the VPS plan on your first order. Cancel anytime
Fatura Kesim Döngüsü

VPS.S1

28.59 RON Save  17 %
23.82 RON Aylık
  • 2 vCPU AMD EPYC
  • 2 GB RAMBELLEK
  • 30 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil

VPS.S3

71.56 RON Save  33 %
47.69 RON Aylık
  • 4 vCPU AMD EPYC
  • 6 GB RAMBELLEK
  • 70 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil

VPS.S4

95.43 RON Save  20 %
76.33 RON Aylık
  • 6 vCPU AMD EPYC
  • 8 GB RAMBELLEK
  • 80 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil

EPYC VPS.P1

42.92 RON Save  22 %
33.37 RON Aylık
  • 2 vCPU AMD EPYC
  • 4 GB RAMBELLEK
  • 40 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil
  • Ücretsiz otomatik yedeklemeGünlük, haftalık veya aylık çalışacak şekilde ayarlayabileceğiniz bir yedekleme alanı içerir.

EPYC VPS.P2

81.11 RON Save  24 %
62.01 RON Aylık
  • 2 vCPU AMD EPYC
  • 8 GB RAMBELLEK
  • 80 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil
  • Ücretsiz otomatik yedeklemeGünlük, haftalık veya aylık çalışacak şekilde ayarlayabileceğiniz bir yedekleme alanı içerir.

EPYC VPS.P4

143.16 RON Save  23 %
109.75 RON Aylık
  • 4 vCPU AMD EPYC
  • 16 GB RAMBELLEK
  • 160 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil
  • Ücretsiz otomatik yedeklemeGünlük, haftalık veya aylık çalışacak şekilde ayarlayabileceğiniz bir yedekleme alanı içerir.

EPYC VPS.P5

190.90 RON Save  25 %
143.16 RON Aylık
  • 8 vCPU AMD EPYC
  • 16 GB RAMBELLEK
  • 180 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil
  • Ücretsiz otomatik yedeklemeGünlük, haftalık veya aylık çalışacak şekilde ayarlayabileceğiniz bir yedekleme alanı içerir.

EPYC VPS.P6

286.38 RON Save  25 %
214.77 RON Aylık
  • 8 vCPU AMD EPYC
  • 32 GB RAMBELLEK
  • 200 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil
  • Ücretsiz otomatik yedeklemeGünlük, haftalık veya aylık çalışacak şekilde ayarlayabileceğiniz bir yedekleme alanı içerir.

EPYC VPS.P7

334.11 RON Save  29 %
238.64 RON Aylık
  • 16 vCPU AMD EPYC
  • 32 GB RAMBELLEK
  • 240 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil
  • Ücretsiz otomatik yedeklemeGünlük, haftalık veya aylık çalışacak şekilde ayarlayabileceğiniz bir yedekleme alanı içerir.

Genoa VPS.G2

119.30 RON Save  20 %
95.43 RON Aylık
  • 2 vCPUAMD EPYC Genoa 4. nesil 9xx4, 3,25 GHz veya benzeri, Zen 4 mimarisinde. AMD EPYC G4
  • 4 GB DDR5BELLEK
  • 50 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil
  • Ücretsiz otomatik yedeklemeGünlük, haftalık veya aylık çalışacak şekilde ayarlayabileceğiniz bir yedekleme alanı içerir.

Genoa VPS.G4

214.77 RON Save  22 %
167.03 RON Aylık
  • 4 vCPUKurumsal sunucu donanımında, ayrılmış vCPU çekirdeklerine sahip AMD EPYC işlemci. AMD EPYC G4
  • 8 GB DDR5BELLEK
  • 100 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil
  • Ücretsiz otomatik yedeklemeGünlük, haftalık veya aylık çalışacak şekilde ayarlayabileceğiniz bir yedekleme alanı içerir.

Genoa VPS.G6

429.59 RON Save  22 %
334.11 RON Aylık
  • 8 vCPUKurumsal sunucu donanımında, ayrılmış vCPU çekirdeklerine sahip AMD EPYC işlemci. AMD EPYC G4
  • 16 GB DDR5BELLEK
  • 200 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil
  • Ücretsiz otomatik yedeklemeGünlük, haftalık veya aylık çalışacak şekilde ayarlayabileceğiniz bir yedekleme alanı içerir.

Genoa VPS.G7

763.75 RON Save  22 %
596.67 RON Aylık
  • 8 vCPUKurumsal sunucu donanımında, ayrılmış vCPU çekirdeklerine sahip AMD EPYC işlemci. AMD EPYC G4
  • 32 GB DDR5BELLEK
  • 250 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil. dahil
  • Ücretsiz otomatik yedeklemeGünlük, haftalık veya aylık çalışacak şekilde ayarlayabileceğiniz bir yedekleme alanı içerir.

AMD Ryzen VPS.R1

81.11 RON Save  18 %
66.79 RON Aylık
  • 1 özel CPU AMD Ryzen 9 7950X, 4,5 GHz veya benzeri, Zen 4 mimarisinde. vCPU
  • 4 GB DDR5BELLEK
  • 50 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6 dahil IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil.
  • Otomatik yedekleme dahil

AMD Ryzen VPS.R2

143.16 RON Save  17 %
119.30 RON Aylık
  • 2 özel CPU AMD Ryzen 9 7950X, 4,5 GHz veya benzeri, Zen 4 mimarisinde. vCPU
  • 8 GB DDR5BELLEK
  • 100 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6 dahil IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil.
  • Otomatik yedekleme dahil

AMD Ryzen VPS.R4

525.06 RON Save  18 %
429.59 RON Aylık
  • 8 özel CPU AMD Ryzen 9 7950X, 4,5 GHz veya benzeri, Zen 4 mimarisinde. vCPU
  • 32 GB DDR5BELLEK
  • 400 GB NVMeDEPOLAMA
  • Sınırsız bant genişliği
  • IPv4 & IPv6 dahil IPv6 desteği şu anda Fransa, Finlandiya veya Hollanda'da mevcut değil.
  • Otomatik yedekleme dahil

*VAT excluded.

INCLUDED WITH EVERY PLAN

✓ No setup fees ✓1 Gbps network
✓ Full root access on KVM ✓ Free server monitoring ✓ Firewall management ✓24/7 support

Conda install vs pip install inside an environment

Both work inside an activated env, and pip there is safe (it installs into the env and nowhere else). Which one to reach for: conda for anything with compiled dependencies, so conda install numpy and friends, because conda ships prebuilt binaries and resolves the C libraries, BLAS or CUDA pieces along with the Python part. pip for small pure-Python libraries and for anything that never made it onto a conda channel.

The ordering deserves more attention than the choice itself. Install conda packages first and let pip fill gaps afterwards, since conda's solver knows nothing about what pip already placed in the env and can clobber it during a later install. Most quietly broken environments I've been asked to look at got that order backwards.

List environments and find where they live

conda env list

That prints every environment with its path, an asterisk marking the active one. By default they all sit under ~/miniconda3/envs/, one self-contained folder per env with its own interpreter and packages. Self-contained also means disk-hungry, and a heavy data-science env passes a few gigabytes without trying, so a du -sh ~/miniconda3/envs/* now and then is worth it, followed by culling the experiments you abandoned in March.

Every big idea starts small

Start on a small VPS and add resources from the panel as your project grows, keeping the same IP and setup and paying only the difference.

Export an environment.yml file

Conda offers two exports that serve different jobs:

conda env export > environment.yml
conda env export --from-history > environment.yml

The first records everything in the env, every transitive dependency pinned to exact versions and build strings. The second records only what you explicitly asked for. For anything shared or committed I'm firmly in the --from-history camp: the full export ties itself to one platform (its build strings won't resolve on a colleague's Mac) and fossilizes dependencies you never chose, where the history variant states your intent and lets the solver work it out on the target machine. The full export still has a job, rebuilding an identical env on the same machine, before a risky upgrade for instance. Both forms, plus flags you'll rarely touch, are in the conda environments documentation.

Recreate an environment from environment.yml

conda env create -f environment.yml

The environment's name comes from the name: field inside the file, and -n othername overrides it when that name is taken. Export plus recreate is how a project moves between machines, and it's also the honest repair path: an env broken badly enough gets deleted and rebuilt from its file, two commands and usually under a minute.

Remove an environment

Deactivate first if you're inside it, then:

conda env remove -n myproject

The whole folder under envs/ goes, with no confirmation prompt and no undo. That sounds harsher than it is in practice, since an exported yml file rebuilds anything you deleted prematurely.

Keep the base environment clean

Install nothing into base except conda itself. This is the opinionated part of the guide, and the reasoning is that base is where conda lives, so a dependency conflict there can break the very tool you'd use to fix it. Base is also where conda updates happen (the guide on how to update Miniconda covers that side), and the less it carries, the less an update can snag on. Whenever the temptation appears to pip install something into base, that's the cue to spend the thirty seconds creating a proper env for it instead.

Defaults vs conda-forge channels

Where packages come from matters more than most tutorials let on. A stock Miniconda install pulls from Anaconda's defaults channels, which are commercially licensed for organizations over 200 employees, while conda-forge is the community channel, free for everyone and usually fresher. You can reach for it per install with -c conda-forge, or make it the default via ~/.condarc. The full trade-off, including the installer that skips defaults entirely, is in the Miniconda vs Miniforge comparison.

For a worked example of this whole lifecycle with real stakes attached, the guide to install PyTorch in a Miniconda environment runs the same sequence against a GPU stack, old broken advice included.

Questions?

Can I create an environment outside ~/miniconda3/envs?

Yes: conda create --prefix ./envs/myproject python=3.12 puts the env at a path you choose, often inside the project folder itself. The trade is that conda can no longer address it by name, so activation takes the full path (conda activate ./envs/myproject) and conda env list shows it without a name column. Prefix envs suit projects living on a separate data disk; named envs suit everything else.

About the author

Alice Langley

I got my first writing work through open-source projects. Before anybody paid me, I was the person rewriting installation notes, answering the same question in Discord for the 25th time and fixing READMEs because the instructions were driving me mad. I was studying then and honestly didn't know technical writing was a job.

But now it's MY job: mostly tutorials, occasionally docs, KBs, sometimes editing. I work freelance. The non-computer part of my life is fairly crowded. I make cosplay costumes and props (sewing is the bit I'm best at, wigs are a different story for now), watch a lot of horror films and have recently started learning bookbinding from somebody who is much more patient than I am.

Deploy your next project in seconds

Bring your winning ideas online faster, with modern hardware and unmetered bandwidth. Join a European cloud trusted by thousands of developers and businesses worldwide.