Will ArcGIS Server 10.9 fully support Python 3.x?

1997
8
06-22-2021 01:12 PM
MichaelBouvet
New Contributor III

We are now beginning to do all our models/scripts in ArcGIS Pro which outputs to python 3. We would love to run these on our ArcGIS Server with task scheduler, but currently you have to activate python 3 in a very complex way (involving the registry) and apparently it does not have all the functionality. 

Will python 3 on ArcGIS Server 10.9 be better than it currently is now?

We are on 10.8.1

8 Replies
JoshuaBixby
MVP Esteemed Contributor

Regarding,

apparently it does not have all the functionality

Can you provide some examples?  We use/publish large numbers of geoprocessing services using Python 3, and we have never run into limitations from Python 2.

0 Kudos
MichaelBouvet
New Contributor III

I am going off what one mvp user told me in another post: 

MichaelBouvet_0-1624400482430.png

 

The post is here: https://community.esri.com/t5/arcgis-api-for-python-questions/can-i-run-a-python-script-i-made-in-mo...

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I guess I disagree with some of the statements in that post.  The Python 3 distribution isn't "hidden" on Server, they just put it in a different place than the Python 2 distribution.  If the packages don't match between Pro and Server, it is very few packages.  I don't have time to compare at the moment, but the commenter in the other thread should have given some hard numbers instead of just making statements they are different.

SDUPD
by
New Contributor II

Thank you! I was hoping he/she would be wrong 🙂

 

0 Kudos
VictorTey
Esri Contributor

I have publish alot of GP in 10.7.1 and 10.8.1 all using arcgis python api (Python 3) and never had any issues. The only thing to watch out if if you install any library, e.g pip install xxx, you will need to install the same package on the server. Please see doc below. 

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

As you can see from the documentation, the python library should be the similar as what pro has (depending on version, at least that has been my experience)

 

SDUPD
by
New Contributor II

Thanks for this info!

If I am just trying to run GP's from pro, do I need to deploy a custom package? I am currently running my script in task scheduler by calling the python.exe in this folder:

<Letter Drive>:\Python27\ArcGISx6410.8\pythonw.exe "<Letter Drive>:\Scripts\MyScript.py"

Is there a way I could still do it like this but with python 3 and not have to install custom package?

0 Kudos
MichaelBouvet
New Contributor III

Btw, SDUPD is the same as the OP (me). I was logged into a different account when I replied. 

 

0 Kudos
VictorTey
Esri Contributor

Hi, 

If you want to run the python 3 version, go to your arcgis pro, settings and python. The recommended practice is to clone the arcgis pro python env (then do whatever you want with it). If you are unable to do that (the clone can be wonky at times), you can use arcgis pro to install packages and still use the default 

VictorTey_0-1624489478360.png

 

This is my default pro python location

VictorTey_1-1624489604272.png

Please mark the answers as a solution if it helps you so that it may help others as well 🙂