Select to view content in your preferred language

ArcGIS Server 10.5 Linux; arcpy: arcgisscripting._mapping not found

10-24-2017 07:15 AM
New Contributor

I try to execute the following code on an ArcGIS Server for Linux installation (Version 10.5, BuildNumber 8707):

import arcpy'blank.aprx')

and get the following Error:

File "/opt/anaconda/envs/arcgis/lib/python3.5/site-packages/arcpy/", line 283, in __init__ 
self._arc_object = arcgisscripting._mapping.ArcGISProject(*gp_fixargs((aprx_path,), True))
AttributeError: module 'arcgisscripting' has no attribute '_mapping'

the same code works fine on Windows with an ArcGIS Pro 2.0 Installation (Build Number 8933).

Is there same API-Change I am not aware of? Did I mess up during the setup? How can I investigate this issue further? 

0 Kudos
3 Replies
MVP Emeritus

Pro uses Python 3.x, ArcGIS Server still uses 2.x (2.7 I believe).  The .mp module is new to Pro

And although you didn't specifically mention publishing to Server from Pro, that is not supported.  Check this thread out

How to publish a service from ArcGIS Pro to ArcGIS server? 

also tagging ArcGIS Enterprise‌   for more exposure.


New Contributor

According to the documentation (The Python 3 runtime for ArcGIS Server on Linux—ArcGIS Server Administration (Linux) | ArcGIS Enterp... ) the runtime for 10.5 moved to python 3.5 .. 

In my code I call the new API, the _mapping part which is not found is called in the background

0 Kudos
MVP Emeritus

Pro using and python 3.5, ArcMap uses arcpy.mapping and python 2.7, but the version of python shouldn't be an issue (I think). is accessed through Pro's anaconda distribution.  No clue how or what server uses, let alone Linux 

0 Kudos