关于windows x64安装MySQL-python失败解决

What are wheels?

Wheels are the new standard of python distribution and are intended to replace eggs. Support is offered in pip >= 1.4 and setuptools >= 0.8.

Advantages of wheels

  1. Faster installation for pure python and native C extension packages.
  2. Avoids arbitrary code execution for installation. (Avoids setup.py)
  3. Installation of a C extension does not require a compiler on Windows or macOS.
  4. Allows better caching for testing and continuous integration.
  5. Creates .pyc files as part of installation to ensure they match the python interpreter used.
  6. More consistent installs across platforms and machines.

MySQL-python只是有32位系统安装包,如果下载exe或者pip安装,也会报错。

报错如下:

_mysql.c() : fatal error C1083: Cannot include : : No s
uch directory

error: command l.exe----------------------------------------
Cleaning up...
Command C:\Users\Admin1\Desktop\python\virtual\Scripts\python.exe -c uptools, tokenize;__file__=MySQL-python\\setup.pyead().replace(, ), __file__, ))\appdata\local\temp\\pip-pmwrd-record\install-record.txt --single-version-ext
ernally-managed ----install-headers C:\Users\Admin1\Desktop\python\virtu
al\include\site\python2failed error code C:\Users\Admin1\Desktop\py
thon\virtual\build\MySQL-python
Storing debug log failure C:\Users\Admin1\pip\pip.

需要安装MYSQL数据库和vc相关库,而自己只需要方便远程连接对服务器数据库操作和学习python,所以没有必要安装这些。

找到如下解决方法:

install using wheel

pip install wheel

MySQL_python安装版本 http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python

下载后,直接使用pip安装:

pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl

如下:

技术分享

这样就安装成功。

本文出自 “都市布衣” 博客,请务必保留此出处http://sunday208.blog.51cto.com/377871/1746404

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值