Convert geo-processing services to run on python3

669
4
Jump to solution
02-17-2022 06:49 PM
JuliettKilo
New Contributor II

I am looking for a way to convert geo-processing services to run on python3; any tips on how should I proceed?

0 Kudos
1 Solution

Accepted Solutions
MehdiPira1
Esri Contributor

@JuliettKilo ,

If you have ArcGIS Pro installed on your pc, you already have python 3 which you can run with Jupyter Notebook. If you only have ArcMap, it only offers python 2 and can not run tools with python 3.

The following link explains migration from ArcMap to ArcGIS Pro and python upgrade:

https://pro.arcgis.com/en/pro-app/2.8/arcpy/get-started/python-migration-for-arcgis-pro.htm

View solution in original post

0 Kudos
4 Replies
MehdiPira1
Esri Contributor

@JuliettKilo ,

If you have ArcGIS Pro installed on your pc, you already have python 3 which you can run with Jupyter Notebook. If you only have ArcMap, it only offers python 2 and can not run tools with python 3.

The following link explains migration from ArcMap to ArcGIS Pro and python upgrade:

https://pro.arcgis.com/en/pro-app/2.8/arcpy/get-started/python-migration-for-arcgis-pro.htm

0 Kudos
JuliettKilo
New Contributor II

@MehdiPira1 

I have been developing my gp services using ArcMap (python 2.x) and I just upgraded to ArcGIS Pro (python 3).

  1. I am having trouble consuming the existing gp services in my new environment (ArcGIS Pro).
  2. Should I also upgrade my server (10.5) to the current version? And if not, how should I proceed consuming my existing gp services?

I am looking for the possible ways not re-publish the existing gp services.

0 Kudos
MehdiPira1
Esri Contributor

@JuliettKilo ,

ArcGIS Server includes Python 2.7 for Windows 64 bit. At ArcGIS Enterprise 10.5 and later, a Python 3-based conda environment is included with ArcGIS Server.

The following link provide more detail in regard to publishing geoprocessing services:

https://enterprise.arcgis.com/en/server/latest/publish-services/windows/deploying-custom-python-pack....

0 Kudos
mody_buchbinder
Occasional Contributor III

I think you must republish, otherwise the server is running it in python2.

Upgrading a python tool from ArcMap to Pro should be very easy, the code is very similar if not identical.

Then you republish and the server mark it as a python 3 service.

Server 10.5 is old but I think it is supporting publishing from Pro.

Have fun

0 Kudos