【发布时间】:2013-12-18 18:16:55
【问题描述】:
我正在尝试为 python2.7 编译 pypoker-eval-138.0 库(默认在 mint linux 上):
因此,当通过./configure 运行配置脚本时,我收到有关 python 解释器版本的错误:
...snip...
checking for a Python interpreter with version =2.3... done
checking for a Python interpreter with version =2.4... done
checking for a Python interpreter with version =2.5... done
checking for a Python interpreter with version =2.6... done
configure: error: No python development environments found
我安装的python版本:
ls /usr/bin/python*
/usr/bin/python (/usr/bin/python -> python2.7)
/usr/bin/python2-dbg-config
/usr/bin/python2 /usr/bin/python3
/usr/bin/python2.7 /usr/bin/python3.3
/usr/bin/python2.7-config /usr/bin/python3.3m
/usr/bin/python2.7-dbg /usr/bin/python3m
/usr/bin/python2.7-dbg-config /usr/bin/python-config
/usr/bin/python2-config /usr/bin/python-dbg
/usr/bin/python2-dbg /usr/bin/python-dbg-config
我也尝试过./configure PYTHON="/usr/bin/python2.7" 和类似的,但在上述问题上遇到了变体:
...snip..
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether /usr/bin/python2.7 version =2.3... configure: error: too old
为了解决这个问题,我花费了大量时间来尝试更改 aclocal/autoconf 设置,但对应该做什么不是很熟悉。我尝试编辑以下 .m4 文件,但失败程度不同:
ls ./aclocal.m4 ./config/*
./aclocal.m4 ./config/install-sh ./config/ltsugar.m4
./config/ccpython.m4 ./config/libtool.m4 ./config/ltversion.m4
./config/config.guess ./config/ltmain.sh ./config/missing
./config/config.sub ./config/lt~obsolete.m4 ./config/py-compile
./config/depcomp ./config/ltoptions.m4 ./config/python.m4
例如./config/ccpython.m4:
...snip..
AC_DEFUN([ALL_CC_PYTHON],
[
m4_define([_AM_PYTHON_INTERPRETER_LIST], [python2.6 python2.5 python2.4 python2.3])
PYTHONS=''
found_one=''
_ONE_CC_PYTHON([=2.3], [2_3])
if test -f "$PYTHON" ; then found_one=$PYTHON ; PYTHONS="$PYTHON $PYTHONS" ; fi
unset PYTHON
...snip..
我的问题是,具体来说:如何为 2.7 编译一个具有仅支持最高 2.6 的配置脚本的 python 模块?我是否必须重新生成配置脚本,或者我可以将一些标志或变量传递给配置脚本以强制构建 2.7?
非常感谢!
【问题讨论】:
标签: python linux python-2.7 configure automake