I have a fresh install of ArcGIS Server and ArcGIS for Desktop both 10.2, latest patches applied. The data is served in this application from a PostgresSQL enterprise geodatabase.
The problem is that I can connect to the database using ArcMap, on the ArcGIS Server (the maps that have their data source set in the database) and I can run python scripts that interact with the database in the python console in ArcMap. Yet, the same scripts, or even the smallest interactions (e.g. listing the feature classes with arcpy.ListFeatureClasses()
) does not work stand alone in python command line. I have tried both the 32 bit and 64 bit Python installations that came with the server and desktop and none run any smallest interactions with the geodatabase.
Any thoughts?
For reference, a small snippet of code that fails:
import arcpy
arcpy.env.workspace = 'path/connection.sde'
arcpy.ListFeatureClasses()
returns:
[]
1 Answer 1
I finally figured that the culprit was my scipy installation and its incompatibilities with the numpy inlcuded with arcpy, etc. Solution: a repair put everything back in order and database connections work perfect.
Now my problem is to find a working 64-bit numpy-scipy stack that does plays well with ArcGIS. For 32-bit, the official 32-bit release from here does the trick. So far no success with the well known binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/
-
My final solution is basically using an older (working) 64-bit installation I had before my fresh install. I think it is mostly ESRI's problem not to use up to date Numpy API, but perhaps that is for compatibility...Mahdi– Mahdi2014年09月03日 02:02:01 +00:00Commented Sep 3, 2014 at 2:02
Explore related questions
See similar questions with these tags.
python
). The interesting thing is that it only works in ArcMap's python window but the same python.exe that it runs is not able to run it. It makes me think that there is some environment variable or path not set properly but I have checked the environment variables withos.environ
against each other and there is no significant difference.