Conda Environment Cheatsheet — For Everyone Using Conda in VS Code
Ziad Tamim / August 12, 2025 • 2 min read
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
- Open VS Code
- Open the terminal (Press
Ctrl + '
) - 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
Action | Command |
---|---|
Create env | conda create -n envname python=3.11 |
Activate env | conda activate envname |
Deactivate env | conda deactivate |
Install package | conda install packagename |
Install via pip | pip install packagename |
List envs | conda info --envs |
Remove env | conda remove -n envname --all |
Export env | conda env export > environment.yml |
Create from export | conda 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
An introduction to TinyML
An introduction to TinyML, its benefits, real-world applications, beginner projects, and the hardware that powers this low-power, edge-based machine learning revolution.
TinyMLMachine LearningEdge AIApril 13, 2025 • 3 min read
0 viewsEvery Data Scientist Should Know This By Heart— Beginners Level Machine Learning Concept
A high-level overview of the fundamental machine learning concepts every data scientist should know before starting their ML journey.
Machine LearningData ScienceML ConceptsBeginnerApril 13, 2025 • 7 min read
0 views