Python 2.5.6 build error on Mac Lion

2019-07-29 13:06发布

问题:

Here is what I would like to do. Use web2py with MySQL.

To do that, I need to use source web2py rather than web2py.app To use web2py, I need Python 2.5

I am having trouble building and installing Python 2.5

I downloaded Python-2.5.6.tgz from Python release page. Now, I did

./configure

and then

make

Then, I get the following error.

gcc -c -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c cc1: error: unrecognized command line option "-Wno-long-double" make: * [Modules/python.o] Error 1

Can anybody help me how to get rid of this error and install Python 2.5?

Here is gcc I am using

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)

Your help would be greatly appreciated. Thanks.

回答1:

web2py works fine with Lion's stock Python 2.7. Unless you have a compelling reason to use 2.5, stick with 2.7.



回答2:

I have web2py on my iMac OSX Lion using the web2py app and MySQL. I haven't run into any reason why you can't use the app with MySQL.



回答3:

To install Python on OS X, try using the Universal Binaries provided on python.org (documented at http://docs.python.org/2/using/mac.html).

See http://www.python.org/ftp/python/2.5.4/python-2.5.4-macosx.dmg for the most recent Universal Binary for Python 2.5.