我一直在尝试使用 pip install flask-mysqldb
安装 flask-mysqldb
,但每次我尝试它都会给我一个错误提示:
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\cl.exe' failed with exit status 2
我环顾四周,没有一个适合我的答案。我在 https://www.lfd.uci.edu/~gohlke/pythonlibs/ 中搜索了文件但它不存在。
我使用的是 Windows 7 x64。
最佳答案
flask-mysqldb
当然找不到whl,但是mysqlclient
可以找到。
从https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient 下载适合您平台的版本
然后,例如pip install mysqlclient-1.3.13-cp27-cp27m-win32.whl
,看你下载什么。
最后,再次pip install flask-mysqldb
,这对你有用。
关于python - 无法安装flask-mysqldb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51228228/