Select to view content in your preferred language

Ubuntu 18.04:Problem with importing arcpy

530
2
04-13-2024 08:12 PM
zak100
by
New Contributor

Hi,

I am using:

import arcpy

but I am getting the error:

ModuleNotFoundError: No module named 'arcpy'

I tried to install it using:

pip install -c esri arcpy

but I am getting the error:

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'esri'

 

Somebody please guide me.

 

Zulfi.

Tags (3)
0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

you can't pip install arcpy, it must be installed in an esri clone of the original arcgispro python installation.

and arcgis pro must be installed on your machine

Download ArcGIS Pro—ArcGIS Pro | Documentation

Clone an environment—ArcGIS Pro | Documentation

Package Manager—ArcGIS Pro | Documentation

The arcgis package which doesn't include arcpy, has other installation requirements and methods

Install and set up | ArcGIS API for Python


... sort of retired...
0 Kudos
Luke_Pinner
MVP Regular Contributor

You're confusing conda installation syntax (-c esri arcpy means install arcpy from the esri conda channel) with pip. ArcPy is not available in PyPi. 

You may be able to install arcpy on your Ubuntu device using conda if you have a recent version of ArcGIS Server already installed and licensed on that device.  You can't  run ArcPy without ArcGIS Server (Windows or Linux) or ArcGIS Pro (Windows only).

Documentation:  https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/installing-arcpy.htm

0 Kudos