Skip to main content
edited title
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

arcpy ArcPy importing error after setting path?

edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
added 42 characters in body
Source Link
ahmadhanb
  • 41.4k
  • 5
  • 54
  • 109

This questions has been asked before too and I did go through most of the suggestions. Things I have tried so far: setting up correct path variable environment, installing anaconda 32 bits, python 2.7, or even switching to python 2.7 in cmd while initially using Anaconda 3 , adding Desktop 10.4.pth file with following path. C:\Program Files (x86)\ArcGIS\Desktop10.4\bin C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcToolBox\Scripts I

C:\Program Files (x86)\ArcGIS\Desktop10.4\bin
C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy
C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcToolBox\Scripts

I also added those paths in environment variable

These suggestions help me to reduce the error. But Now I am getting a different error. Looks like python can find arcpy but missing another package.

Getting this error while trying to import arcpy in python 3.6. File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy_init_.py", line 22, in from arcpy.geoprocessing import gp

File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing_init_.py", line 14, in from _base import *

ModuleNotFoundError: No module named '_base'

File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\__init__.py", line 22, in <module>
    from arcpy.geoprocessing import gp

  File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>
    from _base import *

ModuleNotFoundError: No module named '_base'

Any suggestions?

This questions has been asked before too and I did go through most of the suggestions. Things I have tried so far: setting up correct path variable environment, installing anaconda 32 bits, python 2.7, or even switching to python 2.7 in cmd while initially using Anaconda 3 , adding Desktop 10.4.pth file with following path. C:\Program Files (x86)\ArcGIS\Desktop10.4\bin C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcToolBox\Scripts I also added those paths in environment variable

These suggestions help me to reduce the error. But Now I am getting a different error. Looks like python can find arcpy but missing another package.

Getting this error while trying to import arcpy in python 3.6. File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy_init_.py", line 22, in from arcpy.geoprocessing import gp

File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing_init_.py", line 14, in from _base import *

ModuleNotFoundError: No module named '_base'

Any suggestions?

This questions has been asked before too and I did go through most of the suggestions. Things I have tried so far: setting up correct path variable environment, installing anaconda 32 bits, python 2.7, or even switching to python 2.7 in cmd while initially using Anaconda 3 , adding Desktop 10.4.pth file with following path.

C:\Program Files (x86)\ArcGIS\Desktop10.4\bin
C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy
C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcToolBox\Scripts

I also added those paths in environment variable

These suggestions help me to reduce the error. But Now I am getting a different error. Looks like python can find arcpy but missing another package.

Getting this error while trying to import arcpy in python 3.6.

File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\__init__.py", line 22, in <module>
    from arcpy.geoprocessing import gp

  File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>
    from _base import *

ModuleNotFoundError: No module named '_base'

Any suggestions?

Source Link
Loading