473,395 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

MySQL_python install failed on Ubuntu 7.1

I installed MySQL 5.0.45 on Ubuntu 7.1 and download MySQL_python from
Sourceforge (http://sourceforge.net/project/showfiles.php?
group_id=22307). Then I untar the package and executed "python
setup.py install". But I got compilation errors (see part of the
failed messages below).

Looks like the installation tried to compile the _mysql extension and
failed. Anybody knows a solution to this problem?

Thanks,

Bruza
==============================================
running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
copying MySQLdb/release.py -build/lib.linux-i686-2.5/MySQLdb
running build_ext
building '_mysql' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-
prototypes -fPIC -Dversion_info=(1,2,2,'final',0) -D__version__=1.2.2 -
I/usr/include/mysql -I/usr/include/python2.5 -c _mysql.c -o build/
temp.linux-i686-2.5/_mysql.o -DBIG_JOINS=1
In file included from _mysql.c:29:
pymemcompat.h:10:20: error: Python.h: No such file or directory
_mysql.c:30:26: error: structmember.h: No such file or directory
In file included from /usr/include/mysql/mysql.h:43,
from _mysql.c:40:
/usr/include/sys/types.h:153: error: duplicate 'unsigned'
/usr/include/sys/types.h:153: error: two or more data types in
declaration specifiers
_mysql.c:64: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:65: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:66: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:67: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:68: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:69: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:70: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:71: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:72: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:73: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:74: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
_mysql.c:77: error: expected specifier-qualifier-list before
'PyObject_HEAD'
_mysql.c:87: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '_mysql_ConnectionObject_Type'
_mysql.c:90: error: expected specifier-qualifier-list before
'PyObject_HEAD'
_mysql.c:98: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '_mysql_ResultObject_Type'
_mysql.c:107: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
:
:
Dec 17 '07 #1
2 2295
Bruza a écrit :
I installed MySQL 5.0.45 on Ubuntu 7.1 and download MySQL_python from
Sourceforge (http://sourceforge.net/project/showfiles.php?
group_id=22307). Then I untar the package and executed "python
setup.py install". But I got compilation errors (see part of the
failed messages below).

Looks like the installation tried to compile the _mysql extension and
failed. Anybody knows a solution to this problem?
(snip)
In file included from _mysql.c:29:
pymemcompat.h:10:20: error: Python.h: No such file or directory
Looks like gcc doesn't find the Python's headers. You probably need to
install the "python-dev" (or whatever it's named on Ubuntu) package,
that is the one with the required stuff to compile and link C libs
relying on CPython implementation.
Dec 17 '07 #2
On Dec 17, 1:31 pm, Bruno Desthuilliers
<bdesth.quelquech...@free.quelquepart.frwrote:
Bruza a écrit :
I installed MySQL 5.0.45 onUbuntu7.1and downloadMySQL_pythonfrom
Sourceforge (http://sourceforge.net/project/showfiles.php?
group_id=22307). Then I untar the package and executed "python
setup.pyinstall". But I got compilation errors (see part of the
failedmessages below).
Looks like the installation tried to compile the _mysql extension and
failed. Anybody knows a solution to this problem?

(snip)
In file included from _mysql.c:29:
pymemcompat.h:10:20: error: Python.h: No such file or directory

Looks like gcc doesn't find the Python's headers. You probably need toinstallthe "python-dev" (or whatever it's named onUbuntu) package,
that is the one with the required stuff to compile and link C libs
relying on CPython implementation.
Bruno,

I got it working! As you suggested, I did "sudo apt-get install python-
dev", then "sudo apt-get install mysqldb-python", and it's working
now. Thanks,

Bruza
Dec 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jtan325 | last post by:
hi, i am running Linux Ubuntu Hoary and am trying to build the Python numarray package, v. 1.3.2 by hand since ubuntu's repos won't be updated until breezy. i have python 2.4, and gcc 3.3.5 ...
4
by: Fabian Braennstroem | last post by:
Hi, I am pretty new to python and will use it mainly in combination with scientific packages. I am running ubuntu breezy right now and see that some packages are out of date. Do you have any...
4
by: eby | last post by:
i am knew to linux and i want to know more about it.so as a first step i want to install it in my computer.From where i will get the linux .From this forum i knew that ubuntu is somewhat easier to...
2
by: Dr. Colombes | last post by:
Is there an easy scientific graphics (plotting) package for Python 2.5.1 running on Ubuntu Linux 7.1 ("Gutsy Gibbon")? A few years ago I used PyLab (a MatLab-like plotting module for Python) on...
3
by: spectrumdt | last post by:
Hello. I am trying to install Pypvm (http://pypvm.sourceforge.net/), the Python interface to PVM ("Parallel Virtual Machine"). Unfortunately, installation fails. I am hoping someone can help me...
103
by: Tom | last post by:
How do we get out of the browser infinite loop quicksand when we navigate to web pages designed to lock us in and force us to hit the "pay me" button (whatever they want to force you to do)? ...
6
by: Geon. | last post by:
hi everyone! when i install pysqlite i meet bellow error. ( use easy_install and source code building same problem ) ld: Can't find library for -lpython2.5 what mean this message? and what...
10
tpgames
by: tpgames | last post by:
I just inherited a desktop with ubuntu installed and a bunch of other cool apps. The issue is that the person who gave me the computer accidentally deleted the folder that update manager uses to...
3
by: P4ZP47Z | last post by:
Here is my situation: - My windows install/apps/games were eaten by a virus that replicates into and wrecks .exe files - I made an Ubuntu 9.10 CD on my friends pc, and a Xubuntu 9.10 DVD...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.