AnsweredAssumed Answered

Anybody has luck with import arcpy in 10.5.1?

Question asked by rajugnath on Oct 13, 2017
Latest reply on Jan 17, 2018 by rajugopi

The import arcpy doesn't work in 10.5.1 ArcGIS Desktop installation of python 2.7.13. Anybody in the same boat?

I have both ArcGIS Server and Desktop installed in this machine. But, default python is 32 bit one. The pth variables and environment variables are all good (as it works fine in a Desktop 10.3 installation with same configuration). I even run a repair on this installation. Nothing works.

Here is the error which I get on running import arcpy:


Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (
Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.executable
>>> import arcpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\", line
 20, in <module>
    import numpy
  File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\", line 187, i
n <module>
    from . import add_newdocs
  File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\", line 13,
 in <module>
    from numpy.lib import add_newdoc
  File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\lib\", line 18
, in <module>
    from .polynomial import *
  File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\lib\", line
19, in <module>
    from numpy.linalg import eigvals, lstsq, inv
  File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\linalg\", line
 51, in <module>
    from .linalg import *
  File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\linalg\", line 2
9, in <module>
    from numpy.linalg import lapack_lite, _umath_linalg
ImportError: DLL load failed: The specified path is invalid.

I initiated a tech support case with ESRI and they don't have anything new to contribute as they think that it's a bug. So, they transferred my case to Desktop team from where I am waiting for a response. Meanwhile, I thought of posting it in the community to see whether anybody has luck with solving this issue?