0

I have a one django app , And now i want send it to production linux server but when i try to install mysql-python module , I got this error :

> error: Setup script exited with error: Unable to find vcvarsall.bat

I know that , I can fix this error with installing visual studio in windows .

but I don't know how can i fix this in linux , and i write this app with python 3.4 .

I search all of stackoverflow , but i can't find anything for my problem .

And i Try C++ compiler for python from microsoft but it can't solve my problem .

when I type pip install mysql-python i got this error :

enter image description here Thanks

Wtower
  • 18,848
  • 11
  • 103
  • 80
majid
  • 812
  • 1
  • 12
  • 36

1 Answers1

3

mysql-python does not support Python 3. Django recommends using mysqlclient.

See also Python 3 and MySQL .

pip install mysqlclient

Please also note that some packages are required. Not entirely sure which from the following are specific to mysqlclient, but here is a list of the ones that I install in my servers anyway:

- build-essential
- python-mysqldb
- libmysqlclient-dev
- python3-dev

What is unclear in your question is the part about the ms compiler when the server is ubuntu.

Community
  • 1
  • 1
Wtower
  • 18,848
  • 11
  • 103
  • 80
  • no , i developing my app on the windows and my production server is ubunutu , thats it – majid Mar 27 '16 at 08:53
  • Thanks for your help man . but why django have these things for mysql . it's not straingforwared like a php :D – majid Mar 27 '16 at 09:04
  • 1
    Welcome. Which things, the pip packages? Don't want to start a religious war but php is struggling to reach this functionality for years. – Wtower Mar 27 '16 at 09:08