我正在尝试从源代码安装 GEOS 并使用正确的 Python 绑定(bind)对其进行配置(如此处所示 http://scigeo.org/articles/howto-install-latest-geospatial-software-on-linux.html#geos )。我正在安装它的 Linux 发行版带有 Python 2.6,所以在执行时:
./configure --prefix=/opt/source/geos-3.3.8/build --enable-python
它指向错误的 Python 版本(如预期的那样)
checking for python... /usr/bin/python
checking for python version... 2.6
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.6/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.6/site-packages
我试图通过以下方式将其指向正确的方向:
./configure --prefix=/opt/python/geos-3.3.8/build --enable-python=/opt/python/Python-3.4.3/python
但没有运气:
configure: error: bad value /opt/python/Python-3.4.3/python for --enable-python
有没有办法(不用弄乱/usr/bin/python 就可以让 GEOS 构建指向正确的 Python 版本?)
最佳答案
如链接文章和 README for GEOS 中所述, Python 绑定(bind)在 2006 年发布的 3.0 版中被删除。
如果您需要为 Python 使用 GEOS,请使用 Shapely .
关于python - 从源代码构建 GEOS 并指向正确的 Python 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32351660/