473,698 Members | 2,754 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.eg g-info/PKG-INFO
writing top-level names to MySQL_python.eg g-info/top_level.txt
writing dependency_link s to MySQL_python.eg g-info/dependency_link s.txt
reading manifest file 'MySQL_python.e gg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.e gg-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:1 0: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_Connect ionObject_Type'
_mysql.c:90: error: expected specifier-qualifier-list before
'PyObject_HEAD'
_mysql.c:98: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '_mysql_ResultO bject_Type'
_mysql.c:107: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
:
:
Dec 17 '07 #1
2 2303
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:1 0: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.quelque ch...@free.quel quepart.frwrote :
Bruza a écrit :
I installed MySQL 5.0.45 onUbuntu7.1and downloadMySQL_p ythonfrom
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:1 0: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
2012
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 after unpacking the tar, i run "python setup.py install", as it says in the installation instructions. i get the following:
4
4321
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 suggestion, how I can get/keep the latest python modules (e.g. scipy, numpy,...) on my ubuntu system? I.e. does there exist any script/program, which downloads and installs automatically the latest stable releases of selected modules? It would be...
4
1976
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 install,from where i will get ubuntu.what about installing redhat.
2
2694
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 a Windows machine, but I don't know if there is a similar easy-to-install-and-use Python 2.5.1-compatible graphics package for Ubuntu Linux 7.1? Thanks for any suggestions.
3
2306
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 fix it. I am running Fedora Core 8 Linux. The official Pypvm documentation is very helpful (or something), providing the following:
103
6832
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)? These are just a sample of nasty quicksand web pages I've run into which lock your browser into a loop and won't let you get out until you hit the "install" or "run" or "OK" button... (whatever it is they want you to do). http://www.spywareiso.com...
6
3067
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 i do? my system is hp-ux 11i v3. and python2.5 is installed.
10
3413
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 actually update the programs after one oks updating. Thus, I can't update anything using manager. The folder was called "pool" I think. Question: If the last update of anything was around Firefox 2.00.1 for all programs, including GIMP, Open Office,...
3
5327
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 on this PC while running the Ubuntu one. - Both Linux Disks give a grub failed to install error at 95% - I have a RAID 0 array
0
8683
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9170
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7739
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.