Hi,
I had to install mysqldb for python 2.5 on a
linux gentoo 64 bits machine.
I haven't found the download package for this architecture...
Is it exist ?
And if yes, how must i do to install it ?
I have install the MySQL-python-1.2.2.tar.gz on a Linux gentoo 32 bits machine,
It's not work fine because it install it in the python 2.4 package,
i have moved the MySQLdb package and his "child" in the 2.5 directory of python.
It seems to work but traceback say :
Python 2.5 (r25:51908, Nov 18 2007, 09:23:52) [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
/root/.python-eggs/MySQL_python-1.2.2-py2.4-linux-i686.egg-tmp/_mysql.so:6: RuntimeWarning: Python C API version mismatch for module _mysql: This Python has API version 1013, module _mysql has version 1012.
Finally i had to install mysqldb for python 2.5 on a linux gentoo 2006.0 64 bits machine.
i have do the same as the 32 bits architecture it say :
Python 2.5.1 (r251:54863, Nov 19 2007, 12:53:22) [GCC 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.4-linux-x86_64.egg/MySQLdb/init.py", line 19, in <module>
File "/usr/local/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.4-linux-x86_64.egg/_mysql.py", line 7, in <module>
File "/usr/local/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.4-linux-x86_64.egg/_mysql.py", line 6, in bootstrap
ImportError: /root/.python-eggs/MySQL_python-1.2.2-py2.4-linux-x86_64.egg-tmp/_mysql.so: undefined symbol: Py_InitModule4
>>>
does any body can help me
thanx
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It looks like you're running on a system with both python 2.4 and 2.5 installed. They have different binary APIs, so you have to compile MySQLdb (and any other libraries you want to use) with the correct python. You can't just move the resulting libraries around and expect them to work.
Try recompiling with the command line "python2.5 setup.py install". Most linux systems I'm familiar with will have both "python" and "python2.5" in the path, and "python2.4" if you've got that as well. You may just be getting caught by some ambiguity.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I had to install mysqldb for python 2.5 on a
linux gentoo 64 bits machine.
I haven't found the download package for this architecture...
Is it exist ?
And if yes, how must i do to install it ?
I have install the MySQL-python-1.2.2.tar.gz on a Linux gentoo 32 bits machine,
It's not work fine because it install it in the python 2.4 package,
i have moved the MySQLdb package and his "child" in the 2.5 directory of python.
It seems to work but traceback say :
Python 2.5 (r25:51908, Nov 18 2007, 09:23:52)
[GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
/root/.python-eggs/MySQL_python-1.2.2-py2.4-linux-i686.egg-tmp/_mysql.so:6: RuntimeWarning: Python C API version mismatch for module _mysql: This Python has API version 1013, module _mysql has version 1012.
Finally i had to install mysqldb for python 2.5 on a linux gentoo 2006.0 64 bits machine.
i have do the same as the 32 bits architecture it say :
Python 2.5.1 (r251:54863, Nov 19 2007, 12:53:22)
[GCC 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.4-linux-x86_64.egg/MySQLdb/init.py", line 19, in <module>
File "/usr/local/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.4-linux-x86_64.egg/_mysql.py", line 7, in <module>
File "/usr/local/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.4-linux-x86_64.egg/_mysql.py", line 6, in bootstrap
ImportError: /root/.python-eggs/MySQL_python-1.2.2-py2.4-linux-x86_64.egg-tmp/_mysql.so: undefined symbol: Py_InitModule4
>>>
does any body can help me
thanx
It looks like you're running on a system with both python 2.4 and 2.5 installed. They have different binary APIs, so you have to compile MySQLdb (and any other libraries you want to use) with the correct python. You can't just move the resulting libraries around and expect them to work.
Try recompiling with the command line "python2.5 setup.py install". Most linux systems I'm familiar with will have both "python" and "python2.5" in the path, and "python2.4" if you've got that as well. You may just be getting caught by some ambiguity.