Getting VS2015 to work with arcpy
Question: I am taking a course on programming ESRI's ArcGIS using Python. Although the
course content shows us how to work with various IDE's, I would like to do my
homework in Visual Studio 2015 (Community Edition). But I am having trouble
getting it to work on my laptop and would like some advice.

I have successfully installed ArcGIS. I have successfully run some Python
scripts which include the use of the arcpy module. One IDE that recognizes
arcpy, pycharm, shows me path information about the environment. For example,
PyCharm's External Libraries window shows C:\Python27\ArcGIS10.3 .

In Visual Studio, when I open a .py file known to run under the other
interpreters, the IDE marks import arcpy as an unknown package. So in Visual
Studio I am attempting to set up a new Python Enviornment, "ArcGIS-enabled",
to get it to recognize that package. So far I have not been successful. Here I
what I have tried so far:

I set

    
    
    Prefix Path = C:\Python27\ArcGIS10.3\
    Interpreter Path = C:\Python27\ArcGIS10.3\python.exe
    Windowed Interpreter = C:\Python27\ArcGIS10.3\pythonw.exe
    Library Path = C:\Python27\ArcGIS10.3\lib
    

Can someone please help me figure this out?


Answer: VS probably just needs a minute or two to recognize/load the arcpy package. So
after importing arcpy, just let it sit.

Further to that, if you want to add PYT (PythonToolboxes) as a supported type
to edit, do: **Tools** > **Options** > **Text Editor** > **File Extension**.
Type **pyt** into the text box and choose **Python Editor** from the dropdown
list.

[Reference link](https://cindygeodev.wordpress.com/2015/09/28/enable-
intellisense-in-pyt-files-in-ptvs/)

