0
>>> import arcpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Program Files (x86)\ArcGIS10.5\Desktop10.5\ArcPy\arcpy\__init__.py", line 22, in <module>
    from arcpy.geoprocessing import gp
  File "D:\Program Files (x86)\ArcGIS10.5\Desktop10.5\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>
    from _base import *
  File "D:\Program Files (x86)\ArcGIS10.5\Desktop10.5\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module>
    import arcgisscripting
ImportError: DLL load failed: The specified module could not be found.

What does it mean?

By the way,I have downloaded python 3.7 for studying, which means I may have two python interpreter in my system.

Is it the reason I can't import arcpy?

  • Please edit your question to specify which python interpreter you have set in File->Settings->Project Interpreter and if it's different to the interpreter in the Run->Edit Configurations... for your script. – user2856 Aug 9 at 11:57
  • 1
    This isn't a duplicate, although the symptoms are the same, and the answers to Why can't I import arcpy? are completely irrelevant to PyCharm. – user2856 Aug 10 at 2:29
0

Set your python interpreter in File->Settings->Project Interpreter to C:\Python27\ArcGIS10.5\python.exe and you may need to change the run/debug interpreter for your script in Run->Edit Configurations... to the same python.exe.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.