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\__init__.py", line
20, in <module>
File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\__init__.py", line 187, i
from . import add_newdocs
File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\add_newdocs.py", line 13,
from numpy.lib import add_newdoc
File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\lib\__init__.py", line 18
, in <module>
from .polynomial import *
File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\lib\polynomial.py", line
19, in <module>
from numpy.linalg import eigvals, lstsq, inv
File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\linalg\__init__.py", line
51, in <module>
from .linalg import *
File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\linalg\linalg.py", 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?