查看: 2081|回复: 0

[Mysql数据库] Windows10-python2.7安装MySQLdb报错

发表于 2018-3-9 08:00:02

在Windows10系统上,Python2.7安装MySQLdb报错:Microsoft Visual C++ 9.0 is required.......
根据报错的提示解决没用.....

根据网上资料,最终解决:
下载MySQL_python-1.2.5-cp27-none-win_amd64.whl(https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python,然后pip install xxxx.whl安装即可)

  1. D:\01 software\Python相关软件>pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl
  2. You are using pip version 7.1.0, however version 9.0.1 is available.
  3. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
  4. Processing d:\01 software\python????\mysql_python-1.2.5-cp27-none-win_amd64.whl
  5. Installing collected packages: MySQL-python
  6. Successfully installed MySQL-python-1.2.5
  7. D:\01 software\Python相关软件>python
  8. Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32
  9. Type "help", "copyright", "credits" or "license" for more information.
  10. >>> import MySQLdb
  11. >>> exit
  12. Use exit() or Ctrl-Z plus Return to exit
  13. >>> ^Z
复制代码


回复

使用道具 举报