0

In windows10

I tried pip and easy_instal both failed to install MySQL-python

But show up the following errows:

c:\users\user\anaconda3\include\pyconfig.h(243): fatal error


C1083: can not open the file: 'basetsd.h': No such file or directory
error: Setup script exited with error: command 

'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

How to fix it?

Jonathan Cheng
  • 459
  • 2
  • 11
  • 26
  • Do not know the exact answer, use Linux myself but on Windows have had more luck wit [obdc](https://stackoverflow.com/questions/768312/common-ways-to-connect-to-odbc-from-python-on-windows#768500) – cardamom Jun 11 '17 at 06:28

1 Answers1

2

if you use python 3.+, then unfortunately it has been deprecated the mysql-python module, but alternatively, you can use another module named "pymysql". In pymysql module, you can use it by the following method:

import pymysql as MySQLdb