-
Notifications
You must be signed in to change notification settings - Fork 675
PTVS Installation
Here's the general overview of installing the IDE:
-
Install Visual Studio 2015 Community or higher and select Custom installation.
-
Check "Python Tools for Visual Studio" under "Programming Languages"
-
Install a Python interpreter and libraries (these are not bundled with PTVS)
The Python Tools for Visual Studio extension is completely free, and there are many free Visual Studio editions that can use it.
- Visual Studio 2015
- Community Edition
- Express for Web
- Express for Desktop
- Visual Studio 2013
- Community Edition
- Express for Web
- Express for Desktop
We recommend using Visual Studio 2015 Community Edition, which is the most powerful and has the best extension support. The Express for Web editions are focused on web development and have fewer features, while Express for Desktop includes C++ and features for native development but no web support.
Which one describes you? | Installation steps | Links |
---|---|---|
I already have Visual Studio 2015 and just want Python support | Modify VS through Programs and Features and select Python Tools for Visual Studio | |
I already have Visual Studio 2013 and just want Python support | Install PTVS and you are good to go. | PTVS 2.2 for VS 2013 |
I only have Visual Studio 2012 or 2010, but I still want PTVS | Install PTVS 2.1 | PTVS 2.1 for VS 2012 and VS 2010 |
I don't have VS installed and want the FREE PTVS/VS version! | Install VS 2015 Community Edition (recommended), Express 2015 for Web or for Desktop Install PTVS |
Visual Studio 2015 Community Edition Express for Web Express for Desktop PTVS 2.2 for VS 2015 |
Interpreter | Description | Download Link |
---|---|---|
CPython | This is the native Python interpreter. Best for max language and library compatibility. We recommend 3.5 32-bit for new projects or 2.7 for compatibility with legacy packages. | All versions: http://python.org/download/ Python 2.7.10 32-bit Python 3.5.0 32-bit |
IronPython | This is the .NET implementation of Python. Best for interfacing with C#. We recommend 2.7.5. | IronPython 2.7.5 |
Anaconda | This is a distribution by Continuum Analytics that includes CPython and many useful packages. | Download Anaconda from Continuum Analytics |
Canopy | This is a distribution by Enthought that includes CPython 2.7 and many useful packages. | Download Canopy from Enthought |
Help me decide which interpreter is best for me.
In general, we recommend installing a distribution rather than a standalone interpreter, as most people encounter issues installing libraries. See Python Package Installation Options below for more ways to get packages.
Start Visual Studio: go to File -> New -> Project. Depending on which interpreters(s) you've installed, you should see a list like this. Select "Python Application":
Now start the Interactive Prompt: View -> Other Windows -> Python Interactive. Enter import sys
and sys.version
. You should see something similar to this:
You have everything you need to start programming in Python in Visual Studio.
If you are new to Python, check out some of these free resources:
You may wish to watch a couple of overview videos of PTVS on YouTube to get a feel for the IDE, especially if new to Visual Studio:
- Getting Started (6x 3-5 minute introductory videos)
- Overview of PTVS 2.1 features
- Overview of PTVS 2.0 features
- Live Debug REPL
- Performance Profiling
- Full list of videos on YouTube
You may also wish to browse the wide selection of Python packages and install some that are of interest to you. You can:
- Install individual packages
- Install a full distro
Interested in web development? Check out the Python Developers page on azure.microsoft.com.
What makes Python awesome is the breadth and depth of freely available packages. For a taste, browse through PyPI, or SciPy.org's Topical Software. You can install Python packages individually or via a full "distro". Installing individual packages allows you to tailor your environment with a smaller footprint. distros on the other hand may come with hundreds packages that have been pre-built and well tested together. We generally recommend installing a distro unless you are experienced at managing packages and dependencies.
There are several Python distros available. Most have free and paid versions, as well as 32-bit and 64-bit editions.
Distro | Distributor | Download Link |
---|---|---|
Anaconda | Continuum Analytics, Inc | http://www.continuum.io/downloads |
Canopy | Enthought, Inc | https://www.enthought.com/downloads/ |
Active Python | ActiveState, Inc | http://www.activestate.com/activepython/downloads |
Note: after installing a distro, it may take some time before IntelliSense is available for all packages.
Here are some recommended packages. Generally you want to install packages using pip
or through the interface in Visual Studio (which uses pip
), as this will ensure that you get the latest version that will work with your version of Python, as well as any dependencies.
Some packages have complex dependencies and need to be downloaded manually, either from the project's website or from Christoph Gohlke's package collection.
Package | Description | Download Link |
---|---|---|
numpy | Arrays, linear algebra, FFT's, ... | http://sourceforge.net/projects/numpy/files/NumPy/ |
SciPy | Stats, signal, image, ODE's, ... | http://sourceforge.net/projects/scipy/files/scipy/ |
Matplotlib | 2D graphs and plots | http://matplotlib.org/downloads.html |
Pandas | Stats. Most of "R"'s cool features. | http://pandas.pydata.org/getpandas.html |
IPython | Super REPL, with some integration in PTVS | Install IPython
|
Django | Popular Web Framework | Install django
|
Azure Python SDK | SDK for accessing Windows Azure services and features via Python | Install azure
|
If you are having trouble with installation or need some recommendations:
- Check the issues tracker. Many installation questions have already been answered and can be searched.
- Start a new issue/discussion. Someone from the community or the PTVS team will get you going quickly.
Enjoy!
- Documentation on docs.microsoft.com
- PTVS Project
- Development topics
- Additional resources
- wfastcgi (on PyPI)
- Video index; note that some videos are outdated.