Hi,
I had an earlier version of rtree installed on my old desktop and it was running great.  I have a new desktop and have been loading all of the packages I need.  I loaded rtree using easy_install and it seemed to go well, but I get the following when I try to load it:

Python 2.7.2 |EPD 7.1-2 (64-bit)| (default, Jul  3 2011, 15:34:33) [MSC v.1500 64 bit (AMD64)]
Type "help", "copyright", "credits" or "license" for more information.
>>> from rtree import Rtree
Traceback (most recent call last):
  File "C:\Program Files (x86)\Wing IDE 4.0\src\debug\tserver\_sandbox.py", line 1, in <module>
    # Used internally for debug sandbox under external interpreter
  File "C:\Python27\Lib\site-packages\Rtree-0.7.0-py2.7-win-amd64.egg\rtree\__init__.py", line 1, in <module>
    from index import Rtree
  File "C:\Python27\Lib\site-packages\Rtree-0.7.0-py2.7-win-amd64.egg\rtree\index.py", line 2, in <module>
    import core
  File "C:\Python27\Lib\site-packages\Rtree-0.7.0-py2.7-win-amd64.egg\rtree\core.py", line 76, in <module>
    rt = ctypes.PyDLL(lib_name)
  File "C:\Python27\Lib\ctypes\__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 193] %1 is not a valid Win32 application

I'm running Windows 7, not sure if that has something to do with this or not.  I also tried installing libspatialindex using easy_install (with no apparent problems).  I debugged this import statement and found that "self._name" in the second last line is "spatialindex_c.dll".  This file is in folder C:\python27\DLLs.  And my sys.path is:
>>> import sys
>>> sys.path
['', 'C:\\Program Files (x86)\\Wing IDE 4.0\\src\\debug\\tserver', 'C:\\Python27\\lib\\site-packages\\rtree-0.7.0-py2.7-win-amd64.egg', 'C:\\Python27\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\PIL', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin']

Any ideas why I might be getting this error?  Suggestions would be greatly appreciated!
-Brian



_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to