Installing Python for ArcGIS Server on Linux

1490
5
Jump to solution
08-01-2019 07:57 AM
RichardGordon2
New Contributor

I am attempting to install the Python 3 runtime on a Linux machine in order to allow me to automate the running of a script without the need to install ArcGIS Server, but I am unable to install  "arcgis-server-py3" package. The debian based machine has Anaconda 2019.07 installed and with conda info command showing

active environment : base
active env location : /opt/conda
shell level : 1
user config file : /root/.condarc
populated config files :
conda version : 4.7.10
conda-build version : 3.18.8
python version : 3.7.3.final.0
virtual packages :
base environment : /opt/conda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /opt/conda/pkgs
/root/.conda/pkgs
envs directories : /opt/conda/envs
/root/.conda/envs
platform : linux-64
user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Linux/4.9.125-linuxkit debian/10 glibc/2.28
UID:GID : 0:0
netrc file : None
offline mode : False

However when I attempt to install arcgis-server-py3 the following is returned

(base) root@70ec06d98032:/# conda install -c esri arcgis-server-py3
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Initial quick solve with frozen env failed. Unfreezing env and trying again.
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: \ failed

I am able to install none ESRI Conda packages. Do I need to add in the ESRI channel somehow?

1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

To follow up on my earlier comment, I think you may be confusing the meaning in Esri's documentation:  Python 3 runtime for ArcGIS Server on Linux—ArcGIS Server Administration (Linux) | ArcGIS Enterprise 

ArcGIS Server provides the option to use a Python 3 runtime for command line ArcPy scripts. Select tools can be executed with a Python 3.x runtime that is installed independently of ArcGIS Server.

The term "installed independently" doesn't mean it runs independently.  If you look at the Conda package information at https://anaconda.org/esri/arcgis-server-py3 

Description

This extension enables use of ArcPy from a native Linux environment. This requires that ArcGIS Server for Linux is installed on the machine.

View solution in original post

5 Replies
JoshuaBixby
MVP Esteemed Contributor

I am attempting to install the Python 3 runtime on a Linux machine in order to allow me to automate the running of a script without the need to install ArcGIS Server,

ArcPy won't run unless you have a licensed Esri product (ArcGIS Desktop, ArcGIS Enterprise, ArcGIS Runtime, etc...) installed on the machine. 

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

To follow up on my earlier comment, I think you may be confusing the meaning in Esri's documentation:  Python 3 runtime for ArcGIS Server on Linux—ArcGIS Server Administration (Linux) | ArcGIS Enterprise 

ArcGIS Server provides the option to use a Python 3 runtime for command line ArcPy scripts. Select tools can be executed with a Python 3.x runtime that is installed independently of ArcGIS Server.

The term "installed independently" doesn't mean it runs independently.  If you look at the Conda package information at https://anaconda.org/esri/arcgis-server-py3 

Description

This extension enables use of ArcPy from a native Linux environment. This requires that ArcGIS Server for Linux is installed on the machine.

DrewDowling
Occasional Contributor III

Richard Gordon‌ I'm running into the exact same issue. Does installing Conda and the arcgis-server-py3 on a machine that already has ArcGIS Server installed fix the problem as Joshua Bixby suggests ?

0 Kudos
RichardGordon2
New Contributor

Joshua was correct in that I misunderstood the wording in the article. Since ArcGIS Server needed to be installed in order to run Python anyway script we decided to just publish it to ArcGIS Server as a GP tasks and call that as needed rather than try to run it independently.

0 Kudos
DrewDowling
Occasional Contributor III

OK. Thanks for the response.

0 Kudos