473,739 Members | 6,655 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 2307
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
2013
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
4326
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
1977
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
2701
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
2308
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
6858
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
3073
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
3415
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
5338
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
8792
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9479
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...
0
9337
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9266
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
9209
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6754
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
4570
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...
1
3280
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2193
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.