pypokereval库配置脚本失败,返回“0”;找不到python开发环境“;

pypokereval库配置脚本失败,返回“0”;找不到python开发环境“;,python,linux,python-2.7,configure,automake,Python,Linux,Python 2.7,Configure,Automake,我正在尝试为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 chec

我正在尝试为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版本:

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
$ apt-get install python-dev autoconf pkg-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编译一个python模块,该模块的配置脚本最多只支持2.6?我是否必须重新生成配置脚本,或者我是否可以向配置脚本传递一些标志或变量以强制生成2.7版本


非常感谢

您可以尝试从源代码安装python2.6


或者试用pyenv

您可以尝试从源代码安装python2.6

或者试用pyenv

好的,这是一个挑战(一个人能为声誉做些什么?:)

提示在Changelog中

    * config/python.m4 (AM_PATH_PYTHON): Added python2.6 support.

    * config/ccpython.m4 (ALL_CC_PYTHON): Added python2.6 support.
因此,只需修复这些文件即可支持新的python版本。我刚刚用Python2.7替换了Python2.5,并用
autoreconf
重新配置了它。请参阅下面的完整补丁

要使其正常工作,请确保已安装以下软件包:

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
$ apt-get install python-dev autoconf pkg-config
应用下面的补丁并运行

$ autoreconf
$ ./configure
$ make
这是补丁(我也必须更改Makefile.am):

好吧,这是一个挑战(一个人能为名誉做些什么?:)

提示在Changelog中

    * config/python.m4 (AM_PATH_PYTHON): Added python2.6 support.

    * config/ccpython.m4 (ALL_CC_PYTHON): Added python2.6 support.
因此,只需修复这些文件即可支持新的python版本。我刚刚用Python2.7替换了Python2.5,并用
autoreconf
重新配置了它。请参阅下面的完整补丁

要使其正常工作,请确保已安装以下软件包:

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
$ apt-get install python-dev autoconf pkg-config
应用下面的补丁并运行

$ autoreconf
$ ./configure
$ make
这是补丁(我也必须更改Makefile.am):


对我来说,这两种选择都不可怕。现在试试pyenv,如果成功我会告诉你的。然而,你知道有没有一种方法可以配置2.7的安装吗?这两种方法对我来说都不是很糟糕的选择。现在试试pyenv,如果成功我会告诉你的。但是,您知道是否有办法配置2.7版的安装吗?非常感谢!成功了!我试过一个类似的补丁,但在几个不同的方面搞砸了。您在7年后挽救了这一天,这将帮助我将这个库移植到Python 3!非常感谢你!成功了!我试过一个类似的补丁,但在几个不同的方面搞砸了。您在7年后挽救了这一天,这将帮助我将这个库移植到Python 3!