2

I installed Python 2.7, Django 1.5.5, MySQL 5.5 on Ubuntu. Then I tried to install SQL driver for python :

sudo pip install MySQL-python

and the result was

Downloading/unpacking MySQL-python
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement MySQL-python
Cleaning up...
No distributions at all found for MySQL-python
Storing debug log for failure in .pip/pip.log

What could be the problem?

I tried: sudo easy_install MySQL-python

with the result:

> Searching for MySQL-python Reading
> http://pypi.python.org/simple/MySQL-python/ Download error on
> http://pypi.python.org/simple/MySQL-python/: [Errno -3] Temporary     
> failure in name resolution -- Some packages may not be found! Reading
> http://pypi.python.org/simple/MySQL-python/ Download error on
> http://pypi.python.org/simple/MySQL-python/: [Errno -3] Temporary
> failure in name resolution -- Some packages may not be found! Couldn't
> find index page for 'MySQL-python' (maybe misspelled?) Scanning index
> of all packages (this may take a while) Reading
> http://pypi.python.org/simple/ Download error on
> http://pypi.python.org/simple/: [Errno -3] Temporary failure in name
> resolution -- Some packages may not be found! No local packages or
> download links found for MySQL-python error: Could not find suitable
> distribution for Requirement.parse('MySQL-python')
2
  • Did you tried "easy_install MySQL-python" ? (you need to do "apt-get install python-dev" if you didnt have python dev installed) Commented Jan 30, 2014 at 9:54
  • Looks like problem in package name resolution and it doesn't matter what way I do it. Commented Jan 30, 2014 at 10:14

1 Answer 1

1

The correct command is:

sudo ap-get install python-mysqldb
Sign up to request clarification or add additional context in comments.

2 Comments

sudo apt-get install python-mysqldb worked only after cleanup. First I downloaded .deb package from repository to local disk(other repository than my default), than failed to install it. Later I made sudo apt-get remove ./python-mysqldb_1.2.3-1build1_i386.deb. This cleanup worked for unknown reason. Finally sudo apt-get install python-mysqldb worked.
@ph7: Then you should now be able to pip install MySQL-python

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.