Opened 12 years ago

Last modified 12 years ago

#4725 closed defect

./configure does not support Python 3 — at Initial Version

Reported by: Mateusz Łoskot Owned by: warmerdam
Priority: normal Milestone: 1.10.0
Component: ConfigBuild Version: svn-trunk
Severity: normal Keywords: python3, python2, python, build, configure, linux
Cc:

Description

This problem occured to me in Linux environment where /usr/bin/python points to Python 3.x but not Python 2.x:

mloskot gdal $ python -V
Python 3.2.3
mloskot gdal $ python2 -V
Python 2.7.3

Here are the symptoms:

mloskot gdal $ ./configure --with-python
...
checking for location of Python Makefiles...   File "<string>", line 3
    print sys.prefix
            ^
SyntaxError: invalid syntax
  File "<string>", line 3
    print sys.prefix
            ^
SyntaxError: invalid syntax
  File "<string>", line 3
    print sys.version[:3]
            ^
SyntaxError: invalid syntax
found
checking where to install Python modules... /lib/python/site-packages
enabled
checking for python setuptools...   File "<string>", line 3
    print 1
          ^
SyntaxError: invalid syntax
not found
...

Likely, improving ./configure to support Python 3.x will involve adding new option --with-python3 to avoid ambiguities.

Change History (0)

Note: See TracTickets for help on using tickets.