I feel like a total muppet for not being able to do what is likely a stupidly easy task.

I have downloaded the MySQLdb.zip, unzipped it to my desktop and am trying to get it to work with my python 2.7 (its compliant).

Can anyone give me a step by step walkthrough of how i do this or point me to a video? I have looked up and followed tutorials online but still cant seem to manage this basic task. =/

Thanks.

Recommended Answers

All 3 Replies

OK. I'm assuming that you have MySQL installed and running and you want to access it from Python. Otherwise, you'd be posting in the MySQL forum, right?

I just chanted pip install mysql-python from the command line. Maybe I did it all sudo ? It has been some time since I last had to mess with it. You may have to install pip first, if you don't already have and use it.

Yes, i have MySQL installed and running fine. My problem specifically was i downloaded the MySQLdb zip file and tried adding it to my 2.7x python but i couldnt do it.

in the end i settled for the MySQLdb installer.exe that i found on the net, but it only covers versions up to 2.6x.

i was just wondering how i could add ANY package to my python 2.7x (providing it is compatible ofcoarse).

il take a look into pip now. will that help with that problem? ^^^

Yes, pip will help install any package that it can "know about". The process can be done by hand, but it isn't quite trivial. In essence you have to tell the Python interpreter that the "thing" you just installed is a package. Pip does that for you, as well as keeping track of versions, prerequisites, etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.