Select to view content in your preferred language

Python is Not Installed Error when publishing to Portal

203
2
12-12-2024 06:10 PM
emoreno
Regular Contributor

Hi ESRI Community,

We recently upgraded our Pro from 3.1 to 3.4 on our server not knowing the incompatibility it had with our Enterprise version (10.9.1). We began experiencing issues such as an error when trying to publish to our Portal, which states "Python is not installed". Additionally, we see this error when trying to create a hosted feature layer from a template in the Portal. We downgraded back to 3.1 VIA and uninstall and reinstall of Pro, and have worked with tech support to solve the issue through the following means:

-Renaming python folder to Python_old and repairing the ArcGIS Server

-Removing folders related to any past installations of Enterprise aside from our current version, and repairing the ArcGIS Server

-Attempted publishing from both cloned and non cloned environments, both returning the same error

Does anyone have any ideas as to what else we can do before tech support recommends a full uninstall and reinstall of ArcGIS Server? We are pretty much at a loss as to what else we can try, so input is appreciated. Thank you!

 

0 Kudos
2 Replies
TimoT
by
Frequent Contributor

Upgrading to a later version of ArcGIS Pro wouldn't typically disrupt publishing functionality in your ArcGIS Enterprise outside of Pro.

Is ArcGIS Pro installed on the same machine as your Hosting Server? While not recommended for various reasons, this shouldn't be the sole cause of your issue unless perhaps the Pro upgrade removed/upgraded all other Python versions on your server.

In any case, some things for you to check

  1. Is reverting your ArcGIS Enterprise deployment to a previous backup an option?
  2. Does the Hosting Server machine have a C:\Python27 folder ?
  3. Does your ArcGIS Server service account have full control permissions to this directory?
  4. Open regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\ and verify the registry entries in InstallPath and PythonPath folders - do they show the Python path at C:\Python27?
  5. You may have already tried this or something similar, but run the ArcGIS Server installation setup, select Modify, and disable ArcMap Runtime Support feature. This will remove the Python27 directory. Run the installer again, then re-enable it. Then ensure your service account has full control on the directory, then restart your Server machine (not just the ArcGIS Server service).

I'm going under the assumption you were previously able to publish hosted feature layers. Other things to verify:

  1. Relational datastore validating successfully and in readwrite mode
  2. Can you publish a shapefile or filegeodatabase directly through the Portal UI (not using ArcGIS Pro)
  3. Do existing feature layers still function?
  4. Does publishing work for any other service types? e.g. map image, tile, imagery, etc
0 Kudos
emoreno
Regular Contributor

Hi Timo, 

Thanks for the response! To sum up the answers to your questions:

1) Unfortunately, this would not be an option as we have dependencies specific to our current deployment of Enterprise

2) Yes, the hosting server machine does have the C:\Python27 folder

3) Yes, the ArcGIS service account has full permissions to this directory

4) Yes, the python entries are correct and show the path at C:\Python27 in regedit

5) We haven't tried this yet, but we have some services that still use ArcGIS Runtime. Would those be impacted if we completed this workflow? Additionally, how does this differ from renaming the old python directory, and running the repair to reinstall the Python 27 folder? 

Additionally, all our data stores are successfully validating, including the relational datastore. We cant publish a shapefile through the Portal UI though, as we get the error that states "Python is not Installed". Existing feature layers do still (fortunately) function, but publishing any other service types (from portal UI or ArcPro) all give us the same Python is not Installed error.

What is confusing is that even after stating that a layer has failed to publish due to the Python error, we end up being able to see these test publishes in our Portal. These have the data we're publishing in them and seem to be working normally. 

emoreno_0-1734274007931.png

We have worked with Premium support and completed the disaster recovery workflow to no avail. We believe it is an issue with the server as we attempted to publish a service definition in the server manager itself, which failed with the python error. Any other ideas as to what this could be, or workflows we can test? Appreciate your input!

0 Kudos