Back to posts

Conda Environment Cheatsheet — For Everyone Using Conda in VS Code

Ziad Tamim / August 12, 2025 • 2 min read

Loading...
CondaCheatsheetcommands

This post is for everyone using Conda — it’s a quick reference guide so you don’t have to memorize all the commands when creating or using a Conda environment. Bookmark it and come back anytime you’re starting a new environment.


Make Sure VS Code Sees Conda

  1. Open VS Code
  2. Open the terminal (Press Ctrl + ')
  3. Check if Conda works:
    conda --version
    • If it shows a version, you’re ready.
    • If not, initialize Conda for your shell and restart VS Code:
      conda init powershell
      # or
      conda init cmd.exe

Creating and Activating Environments

Create a new environment with Python 3.11:

conda create --name myenv python=3.11

Activate the environment:

conda activate myenv

Deactivate it:

conda deactivate

💡 Once activated in VS Code’s terminal, the environment will appear in Command Palette → Python: Select Interpreter.


Installing Packages

Install with conda:

conda install numpy pandas matplotlib

Install a specific version:

conda install scipy=1.10.1

Install via pip if package isn't in conda:

pip install transformers

Managing Environments

See all environments

conda info --envs

Remove an environment

conda remove --name myenv --all

Clone an environment

conda create --name myenv_copy --clone myenv

Exporting & Sharing

Export environment to a file

conda env export > environment.yml

Create environment from a file

conda env create --file environment.yml

Quick Reference Table

Quick Reference Table

ActionCommand
Create envconda create -n envname python=3.11
Activate envconda activate envname
Deactivate envconda deactivate
Install packageconda install packagename
Install via pippip install packagename
List envsconda info --envs
Remove envconda remove -n envname --all
Export envconda env export > environment.yml
Create from exportconda env create -f environment.yml

I made this for my self and anyone who uses conda frequently. Anytime you’re setting up a new project in VS Code, just pull up this list and copy-paste what you need.

Recommended Reads