At ArcGIS Enterprise 10.5 and later, a Python 3-based conda environment is included with ArcGIS Server.
The Python installation of ArcGIS Server includes packages such as numpy and matplotlib. However, if you want to install additional custom Python packages, follow the steps below.
Services published from ArcGIS Pro
For geoprocessing services published from ArcGIS Pro or the ArcPy module based on your ArcGIS Pro conda environment, you can specify a Python environment for geoprocessing services following the steps below if there are no other viable options, such as federating ArcGIS Server on a Windows machine.
If you can run ArcGIS Server on a Windows machine, it is recommended that you federate that server to your portal so you can avoid changing the default Python environment for your Linux ArcGIS Server. You can configure your third-party Python packages on your federated Windows ArcGIS Server by following the Windows version of this documentation.
- Back up your ArcGIS Server.
- Sign in to your ArcGIS Server machine with the ArcGIS Server account.
- Optionally, browse to the framework etc directory to ensure the wine explorer is running properly. For example, run the following command:
- Next, browse to the Scripts directory to run the installation commands.
- Restart your ArcGIS Server service. The startserver and stopserver scripts are in the scripts directory of your ArcGIS Server installation.
- Repeat the steps above on all other machines if your ArcGIS Server has a multiple-machine deployment.
Sample commands to activate wine explorer when ArcGIS Server is in the /home directory.
cd /home/arcgis/server/framework/etc source arcenv
Most third-party Python packages will work; however, if the package makes WIN32 calls (directly or indirectly interacting with Windows OS), those packages will not function properly even with a successful configuration.
Sample commands to install the beautifulsoup4 Python package when ArcGIS Server is in the /home directory.
cd /home/arcgis/server/framework/runtime/ArcGIS/bin/Python/Scripts wine conda install bs4