Create a named conda environment#
This tutorial creates a regular named conda environment through the Python Environments interface.
Before you start#
Complete the Quickstart, open a local folder in VS Code, and make sure the folder appears as a Python project in the Python Environments view.
Create the environment#
Run Python Envs: Create Environment from the Command Palette.
Select Conda Code if VS Code asks for an environment manager.
Choose Named environment.
Enter
conda-code-demo.Choose a Python version or accept the default package selection.
Conda Code creates the environment in one of conda’s configured environment directories. It contains Python and appears below Conda Code.
Inspect it from a terminal:
conda list --name conda-code-demo
Add a package#
Expand the new environment in the Python Environments view.
Open Manage Packages.
Install
pytest.
Conda Code applies the change with the configured conda executable.
conda list --name conda-code-demo pytest
Use the environment#
Set the environment for the project, then create a Python terminal from the Python Environments view.
python -c "import sys; print(sys.prefix)"
The printed prefix matches the conda-code-demo environment shown by
conda info --envs.
What happened#
The environment is an ordinary named conda prefix with conda-meta records.
Core conda commands see the same environment model. Conda Code adds the VS Code
integration, not a new regular environment format.