Can not import arcpy modules any more in ArcGIS Pro 2.3?

1620
4
02-07-2019 10:25 PM
simoxu
by MVP Regular Contributor
MVP Regular Contributor
import arcpy
---------------------------------------------------------------------------ImportError                               Traceback (most recent call last)<ipython-input-3-5467a3dc9fe3> in <module>()----> 1 import arcpy C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py in <module>()     70     import _initagsenv     71 ---> 72 from arcpy.geoprocessing import gp     73 from arcpy.geoprocessing import env     74 from arcpy.geoprocessing._base import gptooldoc as _gptooldoc C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\__init__.py in <module>()     12 #     13 #email: contracts@esri.com---> 14 from ._base import *C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py in <module>()     12 #     13 #email: contracts@esri.com---> 14 import arcgisscripting     15 import functools     16  ImportError: DLL load failed: The specified procedure could not be found.
0 Kudos
4 Replies
DanPatterson_Retired
MVP Esteemed Contributor

Simon, do you want to try repasting that error.  I suspect you tried to edit something you had already posted and discovered that you can't do it because the newline character gets stripped.  Your only option would be to go back in and replace each line return.  It is just easier to do your editing when you first post... or if you don't like something or want to remove lines, you should recopy and repaste and start again.

In any event, you have a disconnect between where your install thinks it is and where it is

simoxu
by MVP Regular Contributor
MVP Regular Contributor

No worries Dan. It's working now.

The problem was in my cloned environment, not the default environment. 

I have to delete the flawed env and re-clone the default Pro 2.3 env, and consequently the problem is gone.

0 Kudos
PeipeiLin1
New Contributor II

simo xu‌, I encountered the same issue. Could you give more details on how you solved it?

0 Kudos
PeipeiLin1
New Contributor II

Solved by pointing the path in proenv.txt to the right location. 

0 Kudos