If you prefer to use your own conda version you can specify the path to conda.exe in Tools > Options > Python > Conda. Note that if both the Visual Studio bundled Miniconda and Anaconda are installed, we will use Miniconda to create conda environments.
DEBUG PYTHON IN VISUAL STUDIO INSTALL
If you still want to continue using a full install of Anaconda, you can install Anaconda yourself and continue working with Anaconda by selecting your Anaconda install as the active Python environment. Miniconda allows you to create conda environments on-demand using the Add environment dialog. To address these problems, Anaconda has been removed in favor of the much smaller Miniconda, which is now installed as a default optional component in for the Python workload: Previous versions of Visual Studio allowed you to install Anaconda through the Visual Studio Installer, and while this enabled you to easily acquire Python data science packages, this resulted in large Visual Studio installation times and sometimes caused reliability issues when upgrading versions of Visual Studio. You can continue working while the environment is being created. The dialog also allows you to add existing virtual environments on your machine, or to install new versions of Python.Īfter clicking on Create, you will see a progress notification in the status bar, and you can click the blue link to view progress in the Output window: You can also use the Add environment dialog to create a conda environment, using an environment.yml file, or by specifying a list of packages to install: In this case clicking on ‘Create virtual environment’ will show a new Add environment dialog box, pre-configured to create a new virtual environment using the provided requirements.txt file: This improves discoverability and enables new capabilities such as the ability to create conda environments on-demand and support for Open Folder described later in this post.įor example, when opening a project that contains a requirements.txt file or environment.yml but no virtual environment or conda environment is found, you will be prompted to create an environment with a notification:
To make it easier for you to create virtual or conda Python environments for your project, the ability to create Python environments has been moved from the Python environments window to a new Add environment dialog that can be opened from various parts of Visual Studio. We’ll take a closer look at these new features in the rest of this post. We’ve also enabled Python support for Visual Studio Live Share.
DEBUG PYTHON IN VISUAL STUDIO CODE
Today we are releasing Visual Studio 2019 Preview 2, which contains new features for Python developers to improve the experience for managing Python environments and enable you to work with Python code without having to create a Python project.