2

有一个非常相似的主题,但那里的解决方案对我没有帮助。

我正在尝试从安装中安装和运行kartograpgh.py测试,它像这样中断 =>

C:\tests-kartograph>run_tests.py
Traceback (most recent call last):
  File "C:\tests-kartograph\run_tests.py", line 1, in <module>
    from kartograph import Kartograph
  File "C:\Python27\lib\site-packages\kartograph.py-0.6.5-py2.7.egg\kartograph\_
_init__.py", line 2, in <module>
    from kartograph import Kartograph
  File "C:\Python27\lib\site-packages\kartograph.py-0.6.5-py2.7.egg\kartograph\k
artograph.py", line 8, in <module>
    from map import Map
  File "C:\Python27\lib\site-packages\kartograph.py-0.6.5-py2.7.egg\kartograph\m
ap.py", line 3, in <module>
    from maplayer import MapLayer
  File "C:\Python27\lib\site-packages\kartograph.py-0.6.5-py2.7.egg\kartograph\m
aplayer.py", line 2, in <module>
    from layersource import handle_layer_source
  File "C:\Python27\lib\site-packages\kartograph.py-0.6.5-py2.7.egg\kartograph\l
ayersource\__init__.py", line 11, in <module>
    from shplayer import ShapefileLayer
  File "C:\Python27\lib\site-packages\kartograph.py-0.6.5-py2.7.egg\kartograph\l
ayersource\shplayer.py", line 6, in <module>
    from osgeo.osr import SpatialReference
  File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 21, in <module>
    _gdal = swig_import_helper()
  File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 17, in swig_impor
t_helper
    _mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: DLL load failed: No se encontr¾ el proceso especificado.

我设法安装了所有依赖库,还有 kartograph.py。但是一旦我运行 kartograph.py 提供的测试,我就会得到上面的错误。

我的python版本是:

C:\tests-kartograph>python
Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.

我遵循了上面提到的类似主题中提供的解决方案:

我已经设置了两个环境变量,还注意将其提前写入“路径”变量中。我安装的 GDAL 核心及其 python 二进制文件的版本是:

  • gdal-19-1500-core.msi GDAL
  • GDAL-1.9.2.win32-py2.7.msi

而且我还尝试了核心'gdal-19-1600-core.msi',因为我不是100%确定我需要的GDAL核心,对我来说这个安装似乎并不简单。

我试过安装osgeo4w,它自己安装GDAL,但是失败了,所以我现在没有安装它。我担心这会留下某种注册,这会使我实际安装的 GDAL 及其 DLL 无法通过调用 gdal 模块的 kartograph.py 的执行找到。

非常感谢帮助,尤其是有关如何跟踪或定位真正问题的提示:)

4

0 回答 0