Installing Arcpy module in python 3.8

10099
3
06-30-2020 10:04 PM
FPCWAGIS_Admin
New Contributor III

I've found similar threads from other users with previous versions of python, but struggled to make heads or tails of the "results". I have a python3 script that I'm trying to run (essentially just a the python script created when scheduling an ArcGIS Pro model). 

Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> 
=== RESTART: W:\Mapping\ToolboxPythonCodes\SCRIPTS\SLIP Tenure Processing.py ===
Traceback (most recent call last):
  File "W:\Mapping\ToolboxPythonCodes\SCRIPTS\SLIP Tenure Processing.py", line 2, in <module>
    import datetime, arcpy
ModuleNotFoundError: No module named 'arcpy'
>>> 

I've tried this and also tried reinstalling ArcGIS Pro based on this article but haven't had any luck. Anyone have any pointers for getting the arcpy module to work in a standalone python GUI (IDLE)?

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

You have to use version of python that comes with arcgis pro (aka 3.6.9 currently). 

If you aren't using esri installations, then "shapely" and its open-source associates is used to run the geometry operations, so skip using "import arcpy" altogether.


... sort of retired...
VictorTey
Esri Contributor

Hi FPCWA GIS Admin‌,

you can use any IDE for python, you just need to setup the python engine to the one used by ArcGIS Pro

For example in pyscripter you get set the python version to run. You just need to configure this to point to the arcgis pro python version above (the path to the environment as shown above containing python.exe)

You can also clone the python environment and in the folder/bin/pip.exe you can use pip install to install additional packages.

DanPatterson
MVP Esteemed Contributor

So you are saying arcpy works for python 3.8?

This is contrary to what I was told recently (on the beta 2.6 site)... that arcgisscripting requires that it be compiled against a particular version of python and importing arcpy relies heavily on it (ie, C:\...install..path...\Resources\ArcPy\arcpy\__init__.py


... sort of retired...
0 Kudos