【问题标题】:Can not install MySQL-python(windows)无法安装 MySQL-python(windows)
【发布时间】:2017-11-12 14:32:34
【问题描述】:

在windows10中

我试过 pip 和 easy_instal 都无法安装 MySQL-python

但出现以下错误:

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

如何解决?

【问题讨论】:

  • 不知道确切的答案,我自己使用 Linux 但在 Windows 上运气更好obdc

标签: python-3.x mysql-python


【解决方案1】:

如果您使用 python 3.+,那么不幸的是 mysql-python 模块已被弃用,但您也可以使用另一个名为“pymysql”的模块。 在pymysql模块中,可以通过以下方式使用:

import pymysql as MySQLdb

【讨论】:

    猜你喜欢
    • 2012-10-11
    • 1970-01-01
    • 2014-02-21
    • 2015-03-01
    • 2013-09-05
    • 2018-07-16
    • 2014-07-29
    相关资源
    最近更新 更多