Do you have Pyrex installed? If you do, I think I recall hitting this error when I had an outdated version that was incompatibly slotting into newer versions of distutils and causing a problem like this...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I tried to build MySQL-python 1.2.2 but it appears there is some few errors
Here is the message:
david[MySQL-python-1.2.2c1]#python setup.py build
running build
running build_py
creating build
creating build/lib.linux-i686-2.5
copying _mysql_exceptions.py -> build/lib.linux-i686-2.5
creating build/lib.linux-i686-2.5/MySQLdb
copying MySQLdb/init.py -> build/lib.linux-i686-2.5/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-i686-2.5/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-i686-2.5/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-i686-2.5/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-i686-2.5/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-i686-2.5/MySQLdb
creating build/lib.linux-i686-2.5/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.linux-i686-2.5/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-i686-2.5/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-i686-2.5/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-i686-2.5/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-i686-2.5/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-i686-2.5/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-i686-2.5/MySQLdb/constants
running build_ext
building '_mysql' extension
Traceback (most recent call last):
File "setup.py", line 19, in <module>
setup(**metadata)
File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
cmd_obj.run()
File "/usr/lib/python2.5/distutils/command/build.py", line 112, in run
self.run_command(cmd_name)
File "/usr/lib/python2.5/distutils/cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
cmd_obj.run()
File "/home/david/Desktop/MySQL-python-1.2.2c1/setuptools-0.6c5-py2.5.egg/setuptools/command/build_ext.py", line 46, in run
File "/usr/lib/python2.5/distutils/command/build_ext.py", line 290, in run
self.build_extensions()
File "/usr/lib/python2.5/site-packages/Pyrex/Distutils/build_ext.py", line 82, in build_extensions
self.build_extension(ext)
File "/home/david/Desktop/MySQL-python-1.2.2c1/setuptools-0.6c5-py2.5.egg/setuptools/command/build_ext.py", line 175, in build_extension
File "/usr/lib/python2.5/distutils/command/build_ext.py", line 453, in build_extension
sources = self.swig_sources(sources, ext)
File "/home/david/Desktop/MySQL-python-1.2.2c1/setuptools-0.6c5-py2.5.egg/setuptools/command/build_ext.py", line 77, in swig_sources
TypeError: swig_sources() takes exactly 3 arguments (2 given)
I'm running with python 2.5.2 and mysql 5.051b , i'm running on a slackware (12.1)
Can anyone help me?
Do you have Pyrex installed? If you do, I think I recall hitting this error when I had an outdated version that was incompatibly slotting into newer versions of distutils and causing a problem like this...