我试图为python2.7编译pypoker-eval-138.0库(mint linux上的默认值):
因此,当通过./configure
运行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版本:
^{pr2}$我也尝试过./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编译一个python模块,它有一个只支持2.6的configure脚本?我是必须重新生成配置脚本,还是可以只向配置脚本传递一些标志或变量来强制构建2.7版本?在
多谢了!在
好吧,这是一个挑战(一个人能为名誉做些什么?:). 在
提示在Changelog中
所以它应该只修复这些文件来支持新的python版本。我刚刚用Python2.7替换了Python2.5,用
autoreconf
重新配置了它,它就起作用了。请参阅下面的完整补丁。在要使其正常工作,请确保已安装以下软件包:
^{pr2}$应用下面的补丁并运行
这是补丁(嗯,我得换了生成文件.am以及):
您可以尝试从源代码http://www.python.org/download/releases/2.6.9/安装python2.6
或者试用pyenvhttps://github.com/yyuu/pyenv
相关问题 更多 >
编程相关推荐