Using Python3 modules in GP Service

347
5
02-06-2018 06:17 AM
ModyBuchbinder
Esri Regular Contributor

Hello all

I have a gp tool I wrote in Pro that uses some python libraries that exists only for Python 3 and I would like to publish a GP service for that tool.

As far as I know (see here: FAQ: What version of Python is used in ArcGIS? ) Python 3 is not installed with Server.

Is there a way to do it?

Thanks

0 Kudos
5 Replies
JonathanQuinn
Esri Frequent Contributor

There's no way to use modules/libraries for a version of Python that differs from the version shipped with ArcGIS Server, unfortunately, as GP services will use Python 2.7.

0 Kudos
Luke_Pinner
MVP Regular Contributor

Have you tried? There's a Python 3 runtime available in Server 10.5 on Linux. A comment on GIS StackExchange seems to indicate the Python 3 runtime might be available for Windows as well.

  • Server 10.5 does have an internal version of Python3. This is how it can support geoprocessing services (web tools) created from ArcGIS Pro. I dont have a copy of Server 10.5 in front of me to drill down, but its somewhere deep deep down, like C:\Program Files\Server\Framework\ ... down down \ ..similar path to Python you see in Pro – KHibma Jan 15 at 18:04
JonathanQuinn
Esri Frequent Contributor

I think the difference is whether the OP wants to run GP services using python 3, (which I can't see being possible), vs running standalone scripts on the Server machine using python 3.

0 Kudos
Luke_Pinner
MVP Regular Contributor

I understood from Kevin Hibma's comment that the runtime was there for running GP services and the documentation seems to show you can publish GP tools from ArcGIS Pro - What is a web tool?—ArcGIS Pro | ArcGIS Desktop 

0 Kudos
JonathanQuinn
Esri Frequent Contributor

You're right.. I should read more carefully.

0 Kudos