ArcGIS Linux runs arcpy using wine [1]. Python is a simple wrapper in bash.
...
Python3 via Wine cmd
See [32] for running conda like Windows environment.
- $. /arcgis/server/framework/etc/arcenv
- $wine cmd
- cd c:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\Scripts
- conda create --clone arcgispro-py3 --prefix "Z:\home\arcgis\bin\Python\envs\test"
- proswap Z:\home\arcgis\bin\Python\envs\test
conda install pyarrow
- This will install packages under Z:\home\arcgis\bin\Python\envs\test
Run python and test import.
Code Block |
---|
Z:\home\arcgis\bin\Python\envs\test>python
python
Python 3.6.8 |Anaconda, Inc.| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (\
AMD64)] on win32
Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyarrow |
Python3 via
...
Wine only
Set up path for wine.
Code Block |
---|
|
$. /arcgis/server/framework/etc/arcenv |
Execute python3 under wine.
$wine ./server/framework/runtime/ArcGIS/bin/Python/envs/arcgispro-py3/python.exe |
Alternatively, you can run python in custom environment.
.server/framework/runtime/ArcGISScriptsconda
Info |
---|
ArcGIS Python doesn't include GDAL but it has many APIs [3]. |
References
...
- https://www.linux.org/threads/running-windows-batch-files-on-linux.11205/
- https://enterprise.arcgis.com/en/server/latest/publish-services/windows/deploying-custom-python-packages.htm
- https://pro.arcgis.com/en/pro-app/arcpy/classes/raster-object.htm
Related articles
Content by Label |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | SDT |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label = "arcpy" and type = "page" and space = "SDT" |
---|
labels | arcpy |
---|
|
...