Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't easy_install find MySQLdb?

This is what I tried:

$ easy_install-2.6 -d /home/user/lib/python2.6 MySQLdb   Searching for MySQLdb   Reading http://pypi.python.org/simple/MySQLdb/   Couldn't find index page for 'MySQLdb' (maybe misspelled?)   Scanning index of all packages (this may take a while)   Reading http://pypi.python.org/simple/   No local packages or download links found for MySQLdb   error: Could not find suitable distribution for Requirement.parse('MySQLdb')   
like image 832
BryanWheelock Avatar asked Jun 15 '10 18:06

BryanWheelock


People also ask

Can not import MySQLdb?

Solution: Fix ImportError: No module named MySQLdb It means, Python needs a module to interface with MySQL database and that modules does not seems to be present in the system. All you need to do is, just install MySQL-Python module and the script should work without any problem.

Does MySQLdb support Python 3?

MySQLdb module, a popular interface with MySQL is not compatible with Python 3.


1 Answers

You have the wrong package name.

MySQL-python is the right one:

 easy_install MySQL-python 

or

 pip install MySQL-python 
like image 138
mechanical_meat Avatar answered Oct 12 '22 12:10

mechanical_meat