Python Tools for Visual Studio Installation

Installing PTVS is relatively easy.    You basically need three things:

1) Visual Studio (paid or free version)

2) PTVS extension (gives VS Python support)

3) A Python interpreter and Python Libraries (these are *not* bundled with PTVS)

If you have VS already, install PTVS.  If you don’t, consider installing the PTVS-Integrated package.  Then add an interpreter and you’re good to go:

ins pic 1

ins pic 2

“PTVS Integrated” combines the “VS 2013 Shell” along with PTVS into one single package.  The resulting Python IDE is completely and perpetually free.  PTVS Integrated has all the same features as the full/paid version of VS, except for Profiling and Unit Test support.  Note: PTVS Integrated requires at least Win7 SP1 and IE10. 

NOTE: you cannot install PTVS (or any extension for that matter) into the VS Express editions.

  

1. Install VS & PTVS

Which one describes you? Installation steps Links

I already have Visual Studio and just want to install PTVS!

  • Install the PTVS extension & you are good to go.

2013: PTVS 2.0 VS 2013.msi (Recommended)
2012: PTVS 2.0 VS 2012.msi
2010: PTVS 2.0 VS 2010.msi

I don’t have VS installed and want the Free PTVS+VS Version!

  • Install the 2013 “PTVS Integrated” package. 

This setup is free forever, and includes all functionality except for Profiling, Unit Test integration, and Windows Azure deployment.

Please note:  PTVS Integrated requires at least
Win7 SP1 and IE10.

PTVS Integrated 2.0  (includes the VS2013 Shell)

This will install PTVS + VS Shell both.  You only need to install a Python interpreter yourself (or just hit F5 & PTVS will prompt you).

2. Select and install an interpreter

Interpreter Description Download Link

CPython

This is the native Python interpreter.  Best for max language and library compatibility.  We recommend 32-bit 3.3 or 2.7 for maximum package compatibility. All versions: http://python.org/download/
Python 3.3.2 32-bit Windows Installer 
Python 2.7.5 32-bit Windows Installer

IronPython

This is the .NET implementation of Python. Best for interfacing with C#.  We recommend 2.7.3. IronPython 2.7.3 32- and 64-bit Windows Installer

3. Let’s make sure everything installed OK

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”:

image_thumb2_thumb

Now start the Interactive Prompt: Tools/Python Tools/Python Interactive.   Enter “import sys” and “sys.version”.  You should see something similar to this:

ptvs-home-screen-v1_thumb1_thumb

4. You’re All Set!

You have everything you need to start programming in Python in Visual Studio.

What’s To Do Next?

Python Package Installation Options

What makes Python awesome is the breath/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.  Distro’s on the other hand come with 100+ packages that have been pre-built and well tested together.  We recommend installing a Distro.

1. Installing a full “Distro”

There are several Python Distros available.   Each one has free and paid versions, as well as 32/64 editions.  You should select one that matches your interpreter’s bit-ness:

Distro Distributor Download Link
Anaconda Continuum Analytics, Inc
Canopy Enthought, Inc https://www.enthought.com/downloads/
Active Python ActiveState, Inc http://www.activestate.com/activepython/downloads

Note: after installing a Distro, it’ll take a few minutes before Intellisense is available for all packages.

2. Installing packages individually

Here are some recommended packages.  Generally you want to download the latest version that matches your Python interpreter and its bit-ness.  You can install these from their websites, from PyPI, or directly from Professor Chistoph Gohlke’s Python/Windows page:

Collection Distributor Download Link
CG’s Win Python Pkgs Christoph Gohlke Python Extension Packages for Windows - Christoph Gohlke

Starting with PTVS 2.0Beta, you can install packages directly from within PTVS.  You can also install packages from outside VS and they’ll show up in the list of installed packages for that Interpreter.

To install packages using Python’s own “pip” utility, install it from from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip.  From then, you can simply enter a command (elevated) to grab packages, eg:

pip install Django==1.5.1

Last but not least, you can Install from each project’s corresponding website:

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
IPython Super REPL with PTVS integration (such as inline graphics) http://www.lfd.uci.edu/~gohlke/pythonlibs/.

You want ipython-0.13.2.win32-py3.2.‌exe, pyreadline-2.0.win32-py3.2.‌exe and pyzmq-13.0.2.win32-py3.2.‌exe.

Pandas Stats.  Most of “R”’s cool features. http://pandas.pydata.org/getpandas.html
Django Popular Web Framework – PTVS has been tested with V1.4 “pip install django==1.5.1”
Azure Python SDK SDK for accessing Windows Azure services and features via Python http://go.microsoft.com/fwlink/?linkid=254281&clcid=0x409

Questions?

If you are having trouble with installation or need some recommendations:

  • Check the Discussions section.  Many installation questions have already been answered and can be searched.
  • Start a new thread/discussion.  Someone from the community or the PTVS team will get you going quickly.

Enjoy!

Last edited Jan 20 at 10:37 PM by Zooba, version 55

Comments

mika76 Feb 25 at 8:53 PM 
Answer to my question: https://pytools.codeplex.com/discussions/535544#post1214869

mika76 Feb 25 at 8:45 PM 
Why only recommend the 32bit versions of python?