=====================================
Python Tools for Visual Studio (PTVS)
=====================================

`Python Tools for Visual Studio <http://microsoft.github.io/PTVS/>`_ is a free, open source plugin 
that turns Visual Studio into a Python IDE.

If you have installed Anaconda as your default Python installation and installed PTVS, your 
Visual Studio installation is already set to use Anaconda's Python interpreter in PTVS.

To verify this, create a new Python project, and then check whether Anaconda 
is the Python that it uses.

To create a new Python project:

#. In the **File** menu, select New, and then select Project. The keyboard shortcut is Ctrl-Shift-N.
   
#. Select Python Application:

   .. figure:: /img/PTVS_newproj.png
      :height: 300px

   |

To check which Python the project uses:

#. From the **Tools** menu, select Python Tools, and then select 
   Python Interactive. The keyboard shortcut is Alt+I:

   .. figure:: /img/PTVS_pythoninteractive1.png
      :height: 300px

   |


#. In the **Python Interactive** window, type ``import sys``, and then press Enter.
#. Type ``sys.version``, and then press Enter.

If PTVS is using Anaconda, your Anaconda Python version is displayed. In the example below, it is Anaconda 1.5.0 (64-bit):

.. figure:: /img/PTVS_pythoninteractive2.png
   :height: 150px

|


If PTVS does not automatically discover Anaconda, see the `official PTVS 
documentation <https://docs.microsoft.com/en-us/visualstudio/python/python-in-visual-studio>`_, especially the 
section on `Selecting and Installing Python Interpreters 
<https://docs.microsoft.com/en-us/visualstudio/python/python-environments#selecting-and-installing-python-interpreters>`_ 
and the `PTVS installation instructions 
<https://docs.microsoft.com/en-us/visualstudio/python/installation>`_.
