[Tutor] Connecting to MySQLdb

Corey Richardson corey at octayn.net
Sat Jun 2 01:19:30 CEST 2012


On Fri, 1 Jun 2012 19:01:00 -0400
Nicholas Picciano <npicciano19 at gmail.com> <npicciano19 at gmail.com> wrote:

> Hello,
> 
> I have downloaded MySQLdb 1.2.3 from:
> 
> http://pypi.python.org/pypi/MySQL-python
> 
> Also, I'm using Python 2.7, but I can't even get past here:
> 
> >>> import MySQLdb
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named MySQLdb
> 
> Thanks

Did you install it? 

Assuming UNIX(-like):

I highly, *highly* recommend you use a virtualenv [1] and, if you want
a fancy UI, virtualenvwrapper [2]. From there you can install all the
packages you want with pip, without having to worry about mucking up
the system, versions of things, etc.

Assuming Windows:

Good luck!

-- 
Corey Richardson


More information about the Tutor mailing list