Install a Python interpreter of your choice.
The File > New Project dialog in Visual Studio 2013 gives you a shortcut for this process. Visual Studio 2013: PTVS 2.2.2 for Visual Studio 2013.Install the appropriate version of Python Tools for Visual Studio for your version of Visual Studio: If you already have an interpreter installed and Visual Studio doesn't detect it automatically, see Manually identify an existing environment. Visual Studio 2015 supports only Python 3.5 and earlier later versions generate a message like Unsupported Python version 3.6). Once Visual Studio setup is complete, install a Python interpreter of your choice. Select Programming Languages > Python Tools for Visual Studio and then Next: :::moniker range=" Programs and Features, selecting Microsoft Visual Studio 2015 and then Change. Repair or reinstall Python through Settings > Apps & features in Windows.Įxample error: Failed to start interactive process: 32Exception (0x80004005): Unknown error (0xc0000135) at .d_43.MoveNext().Use the Repair option in the Visual Studio installer.Determine whether the same error occurs using the Python CLI, that is, running python.exe from a command prompt.To fix problems while installing or running Python in Visual Studio, try the following steps: The Python and Data Science workloads are available only with Visual Studio 2017 version 15.2 and later. (The Modify option is then available on the drop-down menu.) You can also launch Visual Studio and the installer from the Windows Start menu by searching on "Visual Studio".
The Modify button changes to Update when updates to Visual Studio are available for any installed components.
Also install the Desktop development with C++ workload for full C++ support.Īfter installation, the installer provides options to modify, launch, repair, or uninstall Visual Studio. Installs the C++ compiler and other necessary components to develop native extensions for Python. Installs tools for web development including HTML, CSS, and JavaScript editing support, along with templates for projects using the Bottle, Flask, and Django frameworks. Installs the Cookiecutter graphical UI to discover templates, input template options, and create projects and files. Also, if a newer version of Python is available than what's shown in the installer, you can install that version separately and Visual Studio will detect it. Visual Studio automatically detects existing Python installations. (You can return to the Visual Studio installer at any time to add or remove distributions.) Note: If you've installed a distribution outside of the Visual Studio installer, there's no need to check the equivalent option here. Anaconda, specifically, is an open data science platform that includes a wide range of pre-installed packages. Each includes the distribution's interpreter, runtime, and libraries. Skip this step to accept the default options.Ĭhoose any combination of the available options, such as 32-bit and 64-bit variants of the Python 2, Python 3, Miniconda, Anaconda2, and Anaconda3 distributions that you plan to work with. On the right side of the installer, choose other options if you want.
For more information, see Data science and analytical applications workload. This workload includes support for the Python, R, and F# languages. Optional: if you're working with data science, also consider the Data science and analytical applications workload. For Python, select the Python development workload. The Visual Studio installer provides you a list of workloads that are groups of related options for specific development areas.
For other uses, install Visual Studio 2019 Professional or Visual Studio 2019 Enterprise. The Community edition is for individual developers, classroom learning, academic research, and open source development. For other users, install Visual Studio 2022 Professional or Visual Studio 2022 Enterprise If you have Visual Studio installed already, run the Visual Studio Installer, select the Modify option (see Modify Visual Studio) and go to step 2. :::moniker range="vs-2017" Visual Studio 2017ĭownload and run the latest Visual Studio installer. To install Python support for Visual Studio (also known as Python Tools for Visual Studio or PTVS), follow the instructions in the section that matches your version of Visual Studio:
How to install Python support in Visual Studio on Windows