473,782 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Issue with MySQLdb wrapper

Hi guys I have a big problem with this wrapper im using Ubuntu 7.04
and I want to install python-MySQLdb, I used synaptics and it is
installed, but when I try to do
>>import MySQLdb
and I get this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: No module named _mysql

so I tried to download it from the site and install it from the .tar
file but I failed because when I run

#~/Desktop/MySQL-python-1.2.2$ python setup.py install

I get this output:

This script requires setuptools version 0.6c5 to run (even to display
help). I will attempt to download it for you (from
http://cheeseshop.python.org/package...s/setuptools/), but
you may need to enable firewall access for this script first.
I will start the download in 15 seconds.

(Note: if this machine does not have network access, please obtain the
file

http://cheeseshop.python.org/package....6c5-py2.5.egg

and place it in this directory before rerunning this script.)
---------------------------------------------------------------------------
Downloading http://cheeseshop.python.org/package....6c5-py2.5.egg
Traceback (most recent call last):
File "setup.py", line 5, in <module>
import ez_setup; ez_setup.use_se tuptools()
File "/home/gerardo/Desktop/MySQL-python-1.2.2/ez_setup.py", line
85, in use_setuptools
import setuptools; setuptools.boot strap_install_f rom = egg
zipimport.ZipIm portError: can't decompress data; zlib not available

I dont know whats that zlib, I installed some libraries with zlib
using synaptics, but still no luck :(, thanks for your help

May 15 '07 #1
1 2387
On May 15, 7:22 pm, Gerard M <gerardo.maldon ...@gmail.comwr ote:
Hi guys I have a big problem with this wrapper im using Ubuntu 7.04
and I want to install python-MySQLdb, I used synaptics and it is
installed, but when I try to do>>import MySQLdb

and I get this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: No module named _mysql
Looks like the install of MySQLdb is botched up. You might try and use
the Ubuntu package management tool to check your installation for
correctness. If that tells you everything is ok and it's still busted,
you might try to uninstall, then reinstall MySQLdb.

If that still doesn't work, you probably should ask about this on one
of the Ubuntu forums.
so I tried to download it from the site and install it from the .tar
file but I failed because when I run

#~/Desktop/MySQL-python-1.2.2$ python setup.py install

[snip]
In general, my guess is that, unless you have a good reason not to,
you should probably not install fairly standard python packages by-
hand like that on Ubuntu. There should be an Ubuntu package for what
you need, and if there is, you should stick with that. If it fails,
the Ubuntu folks will want to know about it.

---John

May 16 '07 #2

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

Similar topics

0
2100
by: Dave Harrison | last post by:
Hi all, got a problem combinging mx and MySQLdb, when I build and install both for my Python2.1 install on a Solaris 9 box I can import mx fine, but importing MySQLdb causing python to core dump. I am using egenenix 2.0.4 and MySQLdb 0.9.2. I have also replaced the -shared flag in the Makefile is /usr/local/lib/Python2.1/config with -G (a recommended solaris change to let the build of the modules work in the first place) -> notably I also...
1
2585
by: Peter Nikolaidis | last post by:
Greetings, I am attempting to get MySQLdb 0.9.2 installed on Mac OS 10.2 with a Fink distribution of Python 2.2.2. I have seen only a few posts on the subject, some of them relate to "conflicting header files," but I don't know what to do about conflicting header files, or where I would find them, and once I found them, which ones to remove. I have compiled MySQL 4.1 and installed into /usr/local/mysql, but since have moved to a Fink...
4
1646
by: Richard Shea | last post by:
Hi - I've writing a Python script which has a query which looks like this ... select * from T where C1 not in (1,2,3) .... C1 is a numeric column so elements of (1,2,3) must not be quoted like this ('1','2','3') and of course they must not be quoted like this ('1,2,3'). I'm using 'scanf' style substitution into the SQL, eg ...
2
5055
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works, sometimes not. From mysql: mysql> show databases; +-----------+ | Database |
4
4375
by: fedor | last post by:
Hi all, I have a problem with mysql connections. After about 28000-29000 connections, I get a "Can't connect to MySQL server on '127.0.0.1'" error. I have made a small program which generates the error """ import MySQLdb
1
2747
by: Steve | last post by:
Darwin steve.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc MacOSX 10.4.3 mysql Ver 14.7 Distrib 4.1.14, for apple-darwin8.2.0 (powerpc) using readline 4.3 runing the software gives me steve:~/MySQL-python-1.2.0 steve$ python setup.py build
1
702
by: Yi Xing | last post by:
Hi, I met the following error when I tried to install MySQLdb. I had no problem installing numarray, Numeric, Rpy, etc. Does anyone know what's the problem? Thanks! running install running build running build_py creating build
8
2780
by: geert | last post by:
Hi all, I have a mac mini running maocosx 10.5 leopard I want to deploy a django project on. My backend is MySQL, and I have it running as a 64- bit app. Of course, apache2 is also running as 64-bit. MySQLdb installs with the usual warnings after applying the various patches I found here and there. These patches consist of altering _mysql.c and site.cfg.
0
988
by: Jacob Davis | last post by:
On Apr 3, 2008, at 10:54 AM, Trent Mick wrote: Thanks, that seems to have worked. I added "/usr/local/bin" to the PATH in the preferences Environment panel in Komodo. Then in preferences I went into the Python pane and changed my selected interpreter from "/usr/bin/pythonw" to the now available "/usr/local/ bin/pythonw". Thanks again,
0
9639
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
9479
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
10146
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
10080
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
9942
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
7492
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
6733
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
5378
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...
3
2874
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.