arcgisscripting load failed in pythonwin

871
2
04-22-2011 09:39 AM
MartinHamel
New Contributor
When I try to load arcgisscripting in Pythonwin, I only get this message:

ImportError: DLL load failed

I've checked the pythonpath and C:/Program Files/ArcGis/Bin is there but instead of having arcgisscripting.dll, there is only arcgisscripting.pyd. From what I've read, it supposes to work but it doesn't.

I've tried using the command line to no avail. Nothing seems to work, all scripts in the Toolbox that uses arcgiscripting are not working properly either?

On my former computer, everything was working fine but on this one, it's driving me bananas!

Any ideas?
Tags (2)
0 Kudos
2 Replies
GroundHogg
New Contributor
When I try to load arcgisscripting in Pythonwin, I only get this message:

ImportError: DLL load failed

I've checked the pythonpath and C:/Program Files/ArcGis/Bin is there but instead of having arcgisscripting.dll, there is only arcgisscripting.pyd. From what I've read, it supposes to work but it doesn't.

I've tried using the command line to no avail. Nothing seems to work, all scripts in the Toolbox that uses arcgiscripting are not working properly either?

On my former computer, everything was working fine but on this one, it's driving me bananas!

Any ideas?


ESRI programmers don't seem to understand how to write an install package: numerous python related dlls are probably not registered on your system, following  ESRI's own instructions (or more often and working more correctly from the user community) do not work either.

ESRI continuously ignores major bugs and sluffs it off for the next version.

I suspect ESRI will only be producing GIS software for a few more years as  ESRI cannot get the long standing bugs out of the program.

AS for you, I found several articles on registering various python modules ESRI fails to install properly (and this is their own software!!!).  Some articles had you drag and drop the needed dll to the proper location.

I found that I could only register some of them (a different issue with metadata export).

ArcGIS10: great big lemon
0 Kudos
KimOllivier
Occasional Contributor III
ArcGIS 10 unfortunately does not install to be used as a development environment. Pythonwin is not installed. You need to install this IDE (or another of your choice). Before you do this I recommend that you fix the Python install.

It can work properly if you understand that Esri installs another copy of Python in a non-standard place. This will result in other Python module installs not being seen because the paths are not common between the two versions.

My solution is to keep the two items needed to point to ArcPy (Desktop10.pth) and the numpy folder in the non standard path c:/Python26/ArcGIS10.0/lib/site-packages, delete the whole Esri second copy, reinstall Python and Pythonwin  in the standard place (C:/Python26) and restore the Esri pointer file and numpy into C:/Python26/Lib/site-packages.

Then Pythonwin will see the Esri modules and everyone else's modules, the Python help will work and things will be sweet. You set the editor to Pythonwin in ArcMap geoprocessing properties to allow you to right-click on the script tool to open in Pythonwin.

After you install ArcGIS 10 SP2 you will have to repeat this exercise! It will add back an empty path C:/Python26/Desktop10.0/Lib/site-packages but there will be no second copy of Python so no geoprocessing tools will work.

I can see a possible reason is to isolate the python version that is hard-coded into arcgisscripting or Arcpy from any other patches. However I have had no trouble with any 2.6.x release. The disadvantages outweigh the fear IMHO.
0 Kudos