Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install mysql-python (Windows)

I've spent hours trying to make Django work on my computer. The problem is that I can't install the mysql-python package. I'm running Windows 7 64bit. This is what I've tried:

  1. I have downloaded easy_install
  2. I have downloaded Cygwin64 to be able to run Linux commands (Win cmd was driving me crazy)
  3. I have typed in: easy_install mysql-python (gave me an error message saying it can't find vcvarsall.bat)
  4. I have downloaded Visual Studio 2010. However, I uninstalled it since I found out that I had some other version of it already (it didn't solve the problem)

I have googled this problem like a thousand times, so I would be very grateful if someone could help me. Thanks in advance!

EDIT: I discovered this: https://pypi.python.org/pypi/MySQL-python/1.2.5. Does this mean I can't run Django with python 3.3? And why bother to go through all this work if there is an .exe-file out there?

like image 812
Myone Avatar asked Jan 29 '14 19:01

Myone


People also ask

Does Python 3.9 support MySQL?

So while mysql-connector-python page on pypi did not assert compatibility with Python 3.9 at the time of asking, v. 8.0. 22/23 would still work if installed under Python 3.9.


2 Answers

try running the following command:

pip install mysqlclient 
like image 158
Ortal Blumenfeld Lagziel Avatar answered Oct 12 '22 05:10

Ortal Blumenfeld Lagziel


If you are trying to use mysqlclient on WINDOWS with this failure, try to install the lower version instead:

pip install mysqlclient==1.3.4 
like image 39
Alfred Huang Avatar answered Oct 12 '22 03:10

Alfred Huang