WIN下解决MySQL-Python模块pip install安装错误

错误描述:

环境win10 64位 python 3.6.3
使用 pip install mysql-python 报错: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

解决办法:

在  https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python 下载对应的whl文件.

MySQL-python, a Python database API 2.0 interface for the MySQL database
Consider mysqlclient, a Python 3 compatible fork of MySQL-python.

因为我的是64位,所以选择下面的MySQL_python‑1.2.5‑cp27‑none‑win_amd64.whl下载到本地.回到 CMD 命令中 pip install D:\Python\MySQL_python-1.2.5-cp27-none-win_amd64.whl  刚才下载的具体路径.

此时依然没有成功又出现错误: MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform.

通过print(pip.pep425tags.get_supported())查看到MySQL_python-1.2.5-cp27-none-win_amd64.whl文件名格式不被支持 通过修改文件名再安装(具体内容可移步这位老哥) => http://blog.csdn.net/csdnjava2017/article/details/78159346
将刚才下载的MySQL_python‑1.2.5‑cp 27‑none‑win_amd64.whl文件名改为MySQL_python‑1.2.5‑cp 36‑none‑win_amd64.whl.

继续运行 pip install D:\Python\MySQL_python-1.2.5-cp36-none-win_amd64.whl
>>:
Installing collected packages: MySQL-python
Successfully installed MySQL-python-1.2.5
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值