Select to view content in your preferred language

arcpy on linux - multiple users

609
1
06-02-2023 07:12 PM
dfolch
by
New Contributor II

We have a large computational task we have scripted in arcpy. Our most powerful machine is an Ubuntu box so we have install ArcGIS Server on it. We have no plans to use ArcGIS Server for anything beyond running arcpy for users directly logged in to the linux box. 

The person who installed ArcGIS Server has successfully gotten a conda environment going and can import arcpy. While others can install arcgis-server-py3 in a new conda environment, they cannot import arcpy.

They can activate the environment, but it gives this warning: "ERROR: Conda must be run by the ArcGIS Server install user". Since the environment is now active, they can start a Python interpreter. When they run "import arcpy" it produces a traceback that ends with, "_initagsenv.error: Xvfb: failed initializing arcpy. Check if environment was activated correctly."

This recent question asked something similar. They recommended changing the permissions for the entire /arcgis/server/ directory to rwx. I'm hoping there is a more targeted solution. 

Tags (4)
0 Kudos
1 Reply
dfolch
by
New Contributor II

After making various targeted changes to permissions, we ended up:

  1. creating a group in Linux and assigning users needing arcpy to that group
  2. changing every directory and file in /arcgis/server/ to give that group r-x

We have no idea if this will have unexpected consequences, but it got arcpy working for multiple users.

Note: Activating the conda environment still gives this warning: "ERROR: Conda must be run by the ArcGIS Server install user". But this doesn't seem to have any impact on arcpy functionality. This error is generated by a file downloaded from conda, not a file in /arcgis/server/

0 Kudos