Open-source project
microsoft/PTVS avatar
microsoft/PTVS

PTVS: Python support inside Visual Studio, and what the repo actually contains

Python Tools for Visual Studio

2,565 stars680 forksC#Apache-2.0

At a glance

What is it?
The microsoft/PTVS repository is the development home for Python tooling in Visual Studio, not a standalone editor. Here is how it installs, what the code layout implies, and where it stops being the right choice.
Who is it for?
Adopt PTVS if your team already standardizes on Visual Studio and wants Python, C++ and C# debugging in one IDE with the Python development workload selected at install time. Do not adopt it if you work outside Visual Studio, or if you are on Visual Studio 2015 or earlier and unwilling to move, since the README states those standalone versions are no longer actively developed.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 5 days ago.
What is it written in?
Mainly C#, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 28, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What PTVS is, and who the repository is written for

PTVS stands for Python Tools for Visual Studio. The repository is not a Python distribution, a package manager or an editor of its own. It is where Python support for Visual Studio is developed and managed, which means the code here is what ships inside Visual Studio rather than something you clone and run as an application.

The audience follows from that. If you already work in Visual Studio for C#, C++ or .NET and you want Python in the same window, with the same debugger UI, the same solution explorer and the same project files, PTVS is the path. If you want a lightweight editor you open from a terminal, this is the wrong shape of tool entirely, and no amount of configuration changes that.

The repository is Apache-2.0 licensed and its primary language is C#, which is worth stating plainly because it explains a common confusion. The product is Python tooling; the implementation is a Visual Studio extension written largely in C#. The README points to the product overview and downloads page, the documentation site, an issue tracker and a wiki, and it invites contributions through a contributing guide. The last push to the default branch was on 2026-09-25.

How the Python workload reaches Visual Studio

There is no separate PTVS installer for current Visual Studio versions. The README states that the Python development workload is available as part of Visual Studio Community, Professional and Enterprise, and that installation happens through the normal Visual Studio installer. You select either the Python development workload or the Data science and analytical applications workload during setup.

That is the whole mechanism from a user's perspective, and it is a deliberate simplification. Earlier, Python support shipped as a standalone extension with its own version numbers, which is why the release list looks the way it does: v2.2.6 in January 2017, a release candidate earlier that month, and v3.0.0-preview5 in October 2016. Those releases belong to the extension era. The README states that prior to Visual Studio 2017 Python support was released as a standalone extension, and that those versions are no longer actively developed.

The repository layout reflects a product that is built, not run. Top-level entries include Python/, Common/, Build/, Examples/, pkg/, and a set of Azure Pipelines definitions covering build, integration tests, an integration tests gate, release and compliance. The build status badge in the README points at a DevDiv pipeline on the main branch. For a reader deciding whether to adopt the tool, the practical consequence is that you never fetch this repository to use PTVS. You fetch it to change it.

Installing the Python development workload

Installation is done through the Visual Studio installer rather than a package manager. The README directs you to the standard download page and says to select the Python development workload, or the Data science and analytical applications workload if that matches your work.

The steps below follow the README's description. The exact installer UI wording may differ by Visual Studio version, so treat the workload names as the thing to look for.

bash
# 1. Download and run the Visual Studio installer from
#    https://visualstudio.com/vs/downloads
# 2. In the installer, open the Workloads tab.
# 3. Check one of:
#      Python development workload
#      Data science and analytical applications workload
# 4. Finish the installation, then open Visual Studio.

After installation, Python appears as a first-class language in the IDE: you can create a Python project, point it at an interpreter, and set breakpoints in .py files the same way you would in C#. The README does not walk through the post-install experience in detail; it defers to the documentation site and to older YouTube tutorials, which the README itself labels as old. If you need current step-by-step guidance, the documentation link is the place to go, not the video links.

For Visual Studio 2015 and earlier the story is different. There is no workload to select in a modern installer. The README points to PTVS 2.2.6 as the latest available version for Visual Studio 2015, and notes it can also be found in the Visual Studio 2015 installer under Custom, in the Programming Languages category. PTVS 2.2.2 is described as the last release for Visual Studio 2013 users.

The extension-era releases and what they mean for upgrades

The release list on the repository is a fossil record. The newest tagged release is v2.2.6 from 2017-01-24, preceded by v2.2.6-rc on 2017-01-04 and v3.0.0-preview5 on 2016-10-07. Anyone scanning releases to judge the project's current state will draw the wrong conclusion, because the shipping mechanism moved into the Visual Studio installer and the tags stopped tracking it.

This matters for upgrade planning in a concrete way. You do not upgrade PTVS by downloading a newer extension package. You upgrade Visual Studio, and the Python tooling moves with it. The README does not document a rollback path for the workload, and it does not describe how to pin a specific version of the Python tooling independently of the IDE. If your organization needs that kind of version pinning, the README is silent on it.

There is a related detail in the repository that hints at how the tooling is assembled today: the root package.json declares a single devDependency, @pylance/pylance at version 2026.2.1, with the package marked private. That is a build-time input, not something an end user installs, but it shows that the Python language intelligence in the product is not built entirely from the C# code in this repository. The README does not explain the relationship, so treat the package.json as a build detail rather than a user-facing feature.

Where PTVS is the wrong tool

The clearest limitation is that PTVS is not a standalone product. If you do not have Visual Studio installed, there is nothing here to run. The repository contains build definitions, source trees and examples such as Examples/PythonCallingNative and Examples/PythonNative, but those examples demonstrate native interop patterns for people working on the tooling, not a way to use PTVS without the IDE.

A second limitation is version lock-in. The README states that versions prior to Visual Studio 2017 are no longer actively developed. That is a direct statement from the project, and it means a team on Visual Studio 2015 is on a branch that receives no further work. The README offers PTVS 2.2.6 as the last available version for that IDE, which is a terminal state, not a maintenance commitment.

A third issue is documentation drift. The README links YouTube tutorials and describes them as old. The wiki and the separate visualstudio-docs repository hold the rest. For a reader trying to evaluate the current debugging experience, the repository itself will not answer the question, and the freshest install instructions live on the downloads page rather than in the README.

Finally, the repository is not a good place to file Python language questions. The issue tracker is for problems with the tooling, and the README explicitly routes feedback through the Send Feedback function inside Visual Studio for problems and feature suggestions.

Visual Studio Python versus Visual Studio Code

The obvious alternative is Visual Studio Code with a Python extension, and the difference is architectural rather than cosmetic. Visual Studio Code is an editor you install and configure independently of any language workload, and Python support arrives as an extension you add and update on its own schedule. PTVS is a workload inside a larger IDE, installed through the Visual Studio installer, updated when the IDE updates.

That distinction drives the practical trade-offs. Visual Studio Code starts fast and stays small, and the Python tooling can move ahead of the editor. Visual Studio brings a heavier install and a workload selection step, and in exchange you get a Python project system, a solution model and a debugger that share their UI with C# and C++. The README's framing of PTVS as part of the Python development workload is exactly this: Python as one language among several in a single IDE.

There is a hint of overlap rather than pure competition. The @pylance/pylance devDependency in the root package.json is the same language server family that powers Python intelligence in Visual Studio Code, which suggests the two products share underlying analysis work even though they ship through different channels. The README does not state this, so treat it as an observation about the build inputs rather than a documented product claim.

If your work is mostly Python and you want the smallest possible setup, the Code route is the more direct one. If your work is mixed and you want one debugger for a Python process calling into native code, the Visual Studio workload is the reason to stay.

Editorial conclusion

Adopt PTVS if your team already standardizes on Visual Studio and wants Python, C++ and C# debugging in one IDE with the Python development workload selected at install time. Do not adopt it if you work outside Visual Studio, or if you are on Visual Studio 2015 or earlier and unwilling to move, since the README states those standalone versions are no longer actively developed. Before committing, verify that the Python development workload or the Data science and analytical applications workload appears in your Visual Studio installer, and confirm that the interpreter you need is detected by the environment window.

Frequently asked questions

What is the best free Python IDE for Windows?

The repository does not rank IDEs. It does state that Python support for Visual Studio is available in Visual Studio Community, Professional and Enterprise, and that Community is one of the editions carrying the Python development workload, so the free option within this project's scope is Visual Studio Community with that workload selected.

Which is better for Python development, Visual Studio or Visual Studio Code?

The README does not compare the two. It describes PTVS as Python support developed and managed inside Visual Studio, installed through the Visual Studio installer as a workload, whereas the repository's package.json shows a Pylance devDependency used at build time. The choice depends on whether you want Python inside a full IDE or in a standalone editor.

Does Visual Studio use C# or C++?

For this repository specifically, the primary language is C#, and the Python tooling is implemented as part of Visual Studio rather than as a Python program. The repository also contains native interop examples under Examples/PythonCallingNative and Examples/PythonNative, which the README does not describe in detail.

Why can't I run my Python code in Visual Studio?

The README does not cover this failure mode. It does state that Python support is installed by selecting either the Python development workload or the Data science and analytical applications workload in the Visual Studio installer, so a missing workload is the first thing to check against that description.

Official sources

  1. License: Apache-2.0
  2. microsoft/PTVS on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/microsoft-ptvs.svg)](https://hysenlabs.com/projects/microsoft-ptvs)