解决Python下pip install MySQL-python失败的问题

命令:

pip install MySQL-python

报错:

_mysql.c(42) : fatal error C1083: Cannot open include file: ‘config-win.h‘: No s
uch file or directory

error: command ‘C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for
 Python\\9.0\\VC\\Bin\\cl.exe‘ failed with exit status 2

环境:

OS:Win7-64bit
Python:2.7.9

解决方案:

在这里下载对应文件

http://www.codegood.com/downloads

There are 11 files, weighing 7.9 MiB in total.

Displaying 1 to 11 of 11 files.

MySQL-python for Windows Distributions

MySQL-python-1.2.2.win-amd64-py2.5.rar
? 862.5 KiB - May 2, 2009
MySQLdb 1.2.2 for Windows and Python 2.5 64 bit

MySQL-python-1.2.2.win-amd64-py2.6.exe
? 1.0 MiB - May 2, 2009
MySQLdb for Windows and Python 2.6 64 bit

MySQL-python-1.2.2.win32-py2.6.exe
? 1,022.8 KiB - May 2, 2009
MySQLdb 1.2.2 for Windows and Python 2.6 32 bit

MySQL-python-1.2.3.win-amd64-py2.7.exe
? 1.0 MiB - September 19, 2010
MySQLdb 1.2.3 for Windows and Python 2.7 64 bit

MySQL-python-1.2.3.win32-py2.7.exe
? 1,023.1 KiB - September 19, 2010
MySQLdb 1.2.3 for Windows and Python 2.7 32 bit

MySQL-python-1.2.3c1.win-amd64-py2.6.exe
? 1.0 MiB - May 2, 2009
MySQLdb 1.2.3c1 for Windows and Python 64 bit

MySQL-python-1.2.3c1.win32-py2.6.exe
? 1,023.2 KiB - May 2, 2009
MySQLdb 1.2.3c1 for Windows and Python 2.6 32 bit

MySQL-python-embedded-1.2.2.win-amd64-py2.6.exe
? 261.0 KiB - May 2, 2009
MySQLdb 1.2.2 for Windows and Python 2.6 64 bit, Embedded Server

MySQL-python-embedded-1.2.2.win32-py2.6.exe
? 231.9 KiB - May 3, 2009
MySQLdb 1.2.2 for Windows and Python 2.6 32 bit, Embedded Server.

MySQL-python-embedded-1.2.3c1.win-amd64-py2.6.exe
? 261.4 KiB - May 2, 2009
MySQLdb 1.2.3c1 for Windows and Python 64 bit, Embedded Server

MySQL-python-embedded-1.2.3c1.win32-py2.6.exe
? 232.3 KiB - May 3, 2009
MySQLdb 1.2.3c1 for Windows and Python 2.6 32 bit, Embedded Server.

效果:

pip install MySQL-python
Requirement already satisfied (use --upgrade to upgrade): MySQL-python in c:\pyt
hon27\lib\site-packages
Cleaning up...
时间: 2024-12-23 20:22:10

解决Python下pip install MySQL-python失败的问题的相关文章

解决python的pip install PIL失败问题

安装PIL的时候遇到个问题, pip install PIL Downloading/unpacking PIL   Could not find any downloads that satisfy the requirement PIL   Some externally hosted files were ignored (use --allow-external PIL to allow). Cleaning up... No distributions at all found for

windows下python -m pip install --upgrade pip升级后报错的解决方法

前言: 笔者装某库的时候提示需要升级pip版本,就python -m pip install --upgrade pip默认升级了,结果升级之后只要输入pip就有报错(如下图),网上百度了很多解决方法,才找到一个正解,接下来分享出来. 解决方法: 1.使用python -m ensurepip这个命令可以自动完成pip的修正2.以后使用pip的时候需要在前面加上python -m 原文地址:https://www.cnblogs.com/lucio1128/p/12036879.html

python -m pip install --upgrade pip升级失败

python -m pip install --upgrade pip升级失败 解决: 采用国内源: python -m pip install --upgrade pip -i https://pypi.douban.com/simple python -m pip install --upgrade pip -i  http://mirrors.aliyun.com/pypi/simple/ 原文地址:https://www.cnblogs.com/NirobertEinteson/p/12

解决You are using pip version 9.0.1, however version 10.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

You are using pip version 9.0.1, however version 10.0.1 is available.You should consider upgrading via the 'python -m pip install --upgrade pip' command. 解决方法: 直接运行命令:python -m pip install --upgrade pip 解决You are using pip version 9.0.1, however vers

Windows下基于Python3安装Ipython Notebook(即Jupyter)。python –m pip install XXX

1.安装Python3.x,注意修改环境变量path(追加上python安装目录,如:D:\Program Files\Python\Python36-32) 2.查看当前安装的第三方包:python –m pip list 3.安装IPython:python –m pip install ipython[all] 4.安装其它: python –m pip install pyzmq python -m pip install jinja2 python -m pip install tor

$ sudo python -m pip install pylint 出错解决方法

问题:在unbuntu执行$ sudo python -m pip install pylint出错解决方法支行以下命令sudo pip install pylint==1.9.3这样roboware_studio 也是可以跑python的 原文地址:https://www.cnblogs.com/dayspring/p/9764650.html

解决Python中出现的问题: “You are using pip version 9.0.1, however version 19.2.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.”

1. 一开始我在使用Pycharm时,导入numpy库,发现导入错误: Non-zero exit code (1) 2. 于是我通过更新的方法来解决,哪知道在更新的时候也出现了错误,错误如下图: 这个错误是在告诉我,我的版本低,需要升级更高的版本才能使用命令python -m pip install --upgrade pip 3. 输入: conda install pip 命令提示我又出现了错误,内容是You don't appear to have the necessary permi

解决'python -m pip install --upgrade pip' 报错问题

再安装包的时候提示 You are using pip version 9.0.3, however version 10.0.1 is available.You should consider upgrading via the 'python -m pip install --upgrade pip' command.12而我按照要求运行python -m pip install --upgrade pip 后仍然无法成功升级,提示如下: (venv) D:\Fish>python -m

you should consider upgrading via the 'python -m pip install --upgrade pip'

在安装python模块PyH时总是提示需要升级pip,于是按照提示输入: python -m pip install --upgrade pip 还是不行,有人说要用管理员权限执行cmd,结果还是失败, 最后使用 pip install --user --upgrade pip (ps:如果不成功可以先试下pip install --upgrade setuptools) 升级成功 看看pip版本 pip --version pip 9.0.1 from ---- 结果安装PyH时却提示么有找到