无法安装flask-mysqldb [英] Cannot install flask-mysqldb

查看:74
本文介绍了无法安装flask-mysqldb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用 pip install flask-mysqldb 安装 flask-mysqldb ,但是每次我尝试它都会给我一个错误提示:

错误:命令'C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Community \ VC \ Tools \ MSVC \ 14.14.26428 \ bin \ HostX86 \ x86 \ cl.exe'失败,退出状态为2

我四处张望,没有答案适合我.我在> https://www.lfd.uci.edu/~gohlke/中搜索了文件pythonlibs/,但不存在.

我在Windows 7 x64系统上.

解决方案

当然,您找不到 flask-mysqldb 的whl,但可以找到 mysqlclient ./p>

https://www.lfd.uci下载适合您平台的版本.edu/〜gohlke/pythonlibs/#mysqlclient

然后,例如 pip install mysqlclient-1.3.13-cp27-cp27m-win32.whl ,取决于您下载的内容.

最后, pip再次安装flask-mysqldb ,这将对您有用.

I've been trying to install flask-mysqldb using pip install flask-mysqldb, but every time I try it gives me an error that says :

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

I've looked around a lot and no answer works for me. I searched the file in https://www.lfd.uci.edu/~gohlke/pythonlibs/ but its not there.

I am on Windows 7 x64.

解决方案

Of course you can not find whl for flask-mysqldb, but you can find mysqlclient.

Download suitable version for you platform from https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient

Then, e.g. pip install mysqlclient-1.3.13-cp27-cp27m-win32.whl, depends what you download.

Finally, pip install flask-mysqldb again, this will work for you.

这篇关于无法安装flask-mysqldb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆