【问题标题】:building GEOS from source and pointing to the right Python version从源代码构建 GEOS 并指向正确的 Python 版本
【发布时间】:2015-11-27 20:57:54
【问题描述】:

我正在尝试从源代码安装 GEOS 并使用正确的 Python 绑定对其进行配置(如此处所示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 版本?)

【问题讨论】:

    标签: python linux build geos


    【解决方案1】:

    如链接文章和README for GEOS 中所述,2006 年发布的 3.0 版已删除 Python 绑定。

    如果您需要为 Python 使用 GEOS,请使用 Shapely

    【讨论】:

    • Shapely 似乎需要 GEOS (GEOS >=3.3 (Shapely 1.2.x 只需要 GEOS 3.1 但 YMMV))...
    • 是的,Shapely 是一个基于 GEOS 的 Python 库。
    猜你喜欢
    • 1970-01-01
    • 2018-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-17
    • 2016-04-25
    • 2017-04-23
    • 2011-04-02
    相关资源
    最近更新 更多