2

Python と Plone プロジェクトに Shapely パッケージを使用しています。卵セクションの下のpackages.cfgファイルで、私はこのようにダウンロードするためにshapelyを使用します

[eggs]
main =
      Shapely

bin/buildout 中に shapely.vectorized に問題があることがわかりました。エラーはこんな感じ

Numpy or Cython not available, shapely.vectorized submodule not being built.

Python 関数の単体テストを作成しました。ファイルを実行すると、エラーが発生します。エラーのトレースバックは

Module: shapely.tests.test_validation

Traceback (most recent call last):
File "/home/nirmalsudhir/zope/myProject/eggs/Shapely-1.3.3-py2.7-linux-i686.egg/shapely 
      /tests/__init__.py", line 27, in <module>
from . import test_doctests, test_prepared, test_equality, test_geomseq, \
File "/home/nirmalsudhir/zope/myProject/eggs/Shapely-1.3.3-py2.7-linux-i686.egg/shapely
      /tests/test_vectorized.py", line 3, in <module>
from shapely.vectorized import contains, touches
File "/home/nirmalsudhir/zope/myProject/eggs/Shapely-1.3.3-py2.7-linux-i686.egg/shapely
      /vectorized/__init__.py", line 3, in <module>
from ._vectorized import contains, touches
ImportError: No module named _vectorized

shapely/tests/__init__.py:

import sys
from shapely.geos import geos_version_string, lgeos, WKTWriter
from shapely import speedups

try:
    import numpy
    numpy_version = numpy.version.version
except ImportError:
    numpy = False
    numpy_version = 'not available'


if lgeos.geos_version >= (3, 3, 0):
    WKTWriter.defaults = {}

if sys.version_info[0:2] <= (2, 6):
   import unittest2 as unittest
else:
import unittest

from . import test_doctests, test_prepared, test_equality, test_geomseq // I get error here 

shapely/tests/test_vectorized.py:

from . import unittest, numpy
from shapely.geometry import Point, box, MultiPolygon
from shapely.vectorized import contains, touches

shapely/vectorized/__init__.py:

from ._vectorized import contains, touches

ベクトル化されたものの何が問題なのかわかりません。誰でも助けることができます。

4

1 に答える 1