Member-only story
Activating your Conda Environment in VS Code: A Step-by-Step Guide
2 min readJul 11, 2024
Let’s activate your conda environment in VS Code and get your coding environment all set up! Here’s a simple walkthrough:
1. Make sure your Conda environment exists:
- You’ll need to have already created your conda environment using the
conda create
command in your terminal. If you haven't done this yet, you can find instructions online or refer to conda documentation. https://www.anaconda.com/download
2. Open VS Code and navigate to your project folder:
- Open VS Code and use the File Explorer to navigate to the directory where your coding project is stored.
3. Activate the environment using the Command Palette:
- Press
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(Mac) to open the Command Palette. This is like a search bar for VS Code commands. - Type
Python: Select Interpreter
and press Enter.
4. Choose your conda environment:
- VS Code will display a list of available Python interpreters, including any conda environments you have created.
- Look for your environment name in the list and click on it to select it.
5. Verify activation (optional):
- You can check if your environment is activated by looking at the bottom right corner of the VS Code window. It should display the name of your active environment.