configure: Python 3.5 is too old
$ ./configure PYTHON=python3
...
checking whether python3 version is >= 3.2... no
configure: error: Python interpreter is too old
where
$ python3 --version
Python 3.5.3
I look into the configure script:
if test -n "$PYTHON"; then
# If the user set $PYTHON, use it and don't search something else.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.2" >&5
$as_echo_n "checking whether $PYTHON version is >= 3.2... " >&6; }
prog="import sys
# split strings by '.' and convert to numeric. Append some zeros
# because we need at least 4 digits for the hex conversion.
# map returns an iterator in Python 3.0 and a list in 2.x
minver = list(map(int, '3.2'.split('.'))) + [0, 0, 0]
minverhex = 0
# xrange is not present in Python 3.0 and range returns an iterator
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
sys.exit(sys.hexversion < minverhex)"
if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
($PYTHON -c "$prog") >&5 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "Python interpreter is too old" "$LINENO" 5
fi
and tested:
$ prog="import sys
> # split strings by '.' and convert to numeric. Append some zeros
> # because we need at least 4 digits for the hex conversion.
> # map returns an iterator in Python 3.0 and a list in 2.x
> minver = list(map(int, '3.2'.split('.'))) + [0, 0, 0]
> minverhex = 0
> # xrange is not present in Python 3.0 and range returns an iterator
> for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
> print(minverhex)"
$ python3 -c "$prog"
50462720
$ python3 -c 'import sys; print(sys.hexversion)'
50660336
same with git clone'd one with ./autogen.sh PYTHON=python3