Skip To Content

Deploy custom Python packages for ArcGIS Server

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 the 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 third-party Python packages on your federated Windows ArcGIS Server by following the Windows version of this documentation.

  1. Back up your ArcGIS Server.
  2. Sign in to your ArcGIS Server machine with the ArcGIS Server account.
  3. Optionally, browse to the framework/etc directory to ensure that the wine explorer is running properly. For example, run the following command:
  4. Sample command to activate wine explorer when ArcGIS Server is in the /home directory.

    cd /home/arcgis/server/framework/etc
    source arcenv
  5. Browse to the Scripts directory to run the installation commands.
  6. Note:

    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 command 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
  7. Restart your ArcGIS Server service.

    The startserver and stopserver scripts are in the scripts directory of your ArcGIS Server installation.

  8. Repeat the steps above on all other machines if your ArcGIS Server has a multiple-machine deployment.