您的位置:首页 > 编程语言 > Python开发

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

2018-03-19 19:20 761 查看
错误描述:
环境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 databaseConsider mysqlclient, a Python 3 compatible fork of MySQL-python.·  MySQL_python‑1.2.5‑cp27‑none‑win32.whl
·  MySQL_python‑1.2.5‑cp27‑none‑win_amd64.whl

因为我的是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‑cp27‑none‑win_amd64.whl文件名改为MySQL_python‑1.2.5‑cp36‑none‑win_amd64.whl.

继续运行 pip install D:\Python\MySQL_python-1.2.5-cp36-none-win_amd64.whl>>:Installing collected packages: MySQL-pythonSuccessfully installed MySQL-python-1.2.5
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐