Masthead

Calling ArcGIS Pro From Python 3.x with Wing

Note: The information below has a number of notes that might be helpful as we transition from ArcGIS 10.x with Python 2.7 to ArcGIS Pro with Python 3.x

ArcGIS Pro works with Python 3 and not Python 2.7. This means the days of using Python 2.7 are finally coming to an end! The problem is that there are still issues with libraries, especially on MS-Windows. Below are some steps to getting a Python 3.x installation up and running with other libraries.

Python 3.x

It looks like folks are still recommending the 32-bit installer for MS-Windows for Python because of compatibility problems with some of the 64-bit libraries.

The new Python installers will default to putting Python in your "users" folder if you install it for a single user. If you install it for any user it will install it in C:\Program Files (x86). I had problems with both of these paths but got it to work by installing it in the old location, C:\Python36-32 where 36-32 is the version.

Wing IDE

The Wing IDE version 5 does not work with Python 3.6 so I upgraded to Wing IDE version 6.

NumPy, MatPlotLib

Note: NumPy and MatPlotLib came with the install that I did for ArcGIS Pro so you may not need this.

Neither pip or easy_install worked for installing numpy and matplotlib but the Unofficial Windows Binarys from Christoph Gohlke worked great (and were quite fast). You just want to make sure you grab the right wheel (whl) file for your version of Python and for 32-bit windows. For me, this was:

These need to be installed using pip which is a bit of a pain. My approach was to:

ArcGIS Pro

First, Esri is changing the way they are delivering Python in almost every release of ArcGIS Pro and the documentation is largely incorrect. When I installed ArcGIS Pro 1.4, I ended up with two Python installations being downloaded and installed with ArcGIS Pro. Only one of them has arcpy in it and you need to use that one to call ArcGIS Pro from Python. The one I used is below and it worked in the Wing IDE version 6.0.

 

© Copyright 2018 HSU - All rights reserved.