Can't install mysql-python version 1.2.5 in Windows

http://stackoverflow.com/questions/37092125/cant-install-mysql-python-version-1-2-5-in-windows
 
No problem. We won't show you that ad again. Why didn't you like it?

  • Uninteresting
  • Misleading
  • Offensive
  • Repetitive
  • Other

Oops! I didn't mean to do this.

         up vote0down votefavorite

 

I have mysql-python v1.2.4 installed just fine on my machine (Windows 8). I am using Python 2.7. I always got this below error every time I try to upgrade to v1.2.5.

C:\Users\User\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\

9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=(1,2,5,'fi nal',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.  0.2\include" -Ic:\python27\include -Ic:\python27\PC /Tc_mysql.c /Fobuild\temp.wi n32-2.7\Release_mysql.obj /Zl      _mysql.c      _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory      error: command 'C:\Users\User\AppData\Local\Programs\Common\Microsoft \Visual  C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

----------------------------------------   Rolling back uninstall of mysql-python Command "c:\python27\python.exe -u -c "import

setuptools, tokenize;file='c:\  \users\user\appdata\local\temp\pip-build-utz7of\MySQL-python\setup.py';ex  ec(compile(getattr(tokenize, 'open',  open)(file).read().replace('\r\n', '\n' ), file, 'exec'))"  install --record c:\users\user\appdata\local\temp\pip-osy  _cg-record\install-record.txt --single-version-externally-managed --compile" fai led with error code 1 in c:\users\user\appdata\local\temp\pip-build-utz7of\MySQL  -python\

I've tried (and none work):

  1. Installing VS2010
  2. Changing Python Path
  3. Using Wheel module (I got Failed building wheel for MySQL-python)
  4. Installing Python MySQL connector. For both Python and C.
  5. Installing mysqlclient
  6. Installing using Exe installer from https://pypi.python.org/pypi/mysql-python/1.2.5

Do I miss something? Thanks.

Magnus Lind Oxlund

54212        
        asked May 7 at 18:21    
Aminah Nuraini

1,8361026        
                                                                                                                    
I don't understand why do I get a down vote. It is similar to some questions, but I've tried their solution and none work. Please explain the down vote reason if you want to act that way                     – Aminah Nuraini                 May 9 at 4:28                                                                            
                                                                                                                    
What happened when you used the exe installer?                     – Burhan Khalid                 May 9 at 4:46                                                                            
                                                                                                                    
It got installed just fine, but then I still fail to install mysql-python                     – Aminah Nuraini                 May 9 at 4:49                                                                            
                                                                                                                    
How do you know it failed? Did you try to import it and get an error?                     – Burhan Khalid                 May 9 at 5:24                                                                            
                                                                                                                    
I keep getting the error I've pasted in the question. Can't find config-win.h, etc.                     – Aminah Nuraini                 May 9 at 5:54                                                                            
 |              show 1 more comment        

1 Answer                                 1

active         oldest         votes
         up vote0down voteaccepted

I solved it myself.

I use the wheel installer from http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python.

There are two wheel packages there. The amd64 one refuses to install on my platform (Windows) but the other one works just fine. I mean the file with this name:

MySQL_python-1.2.5-cp27-none-win32.whl

Then install it by running this below command in the same folder with the wheel package.

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

Can't install mysql-python version 1.2.5 in Windows的更多相关文章

  1. How to Access MySQL with Python Version 3.4

    http://askubuntu.com/questions/630728/how-to-access-mysql-with-python-version-3-4 How to Access MySQ ...

  2. pip install报错:RuntimeError: Python version >= 3.5 required

    由于pip官方的不作为,现如今python2(以及某些低版本python3)配套的pip,已经没法正常的安装pypi包了. 例如需要用到的一套PyCaffe的代码,是基于Python2的,于是用min ...

  3. How do you install mysql-connector-python (development version) through pip?

    12down votefavorite 8 http://stackoverflow.com/questions/31748278/how-do-you-install-mysql-connector ...

  4. How to install Mysql in the CentOS

    This article will walk through you the process of installing and updating latest MySQL 5.7.9 version ...

  5. 02_已解决 [salt.minion :1758][ERROR ][52886] Returner mysql.returner could not be loaded: 'mysql' __virtual__ returned False: Could not import mysql returner; mysql python client is not installed.

    总结:python2.7下的salt,要把 mysql-python也安装,并不是python3环境,看清,看清 Returners组件,master自动把值写入mysql数据库中,出现的问题 1.本 ...

  6. 在OSX狮子(Lion)上安装MYSQL(Install MySQL on Mac OSX)

    这篇文章简述了在Mac OSX狮子(Lion)上安装MySQL Community Server最新版本v10.6.7的过程. MySQL是最流行的开源数据库管理系统.首先,从MySQL的下载页面上下 ...

  7. 【亲测】Python:解决方案:Python Version 2.7 required, which was not found in the registry

    好久不更新随笔了,今天因为数据可视化作业,想抓取一些人人网好友关系数据,于是开始尝试python,用到numpy模块,安装的时候提示: 'Python Version 2.7 required, wh ...

  8. 96、python version 3.6 required,which was not fount in the registry(python3.6安装scrapy)

    在安装scrapy时遇到问题 环境:win10(64位), Python3.6(64位) 安装scrapy: 1.安装wheel(安装后,便支持通过wheel文件安装软件) pip3 install ...

  9. How to change from default to alternative Python version on Debian Linux

    https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux You ...

随机推荐

  1. Tomcat-MAC下添加Tomcat环境并运行

    MAC下添加Tomcat环境运行 1. 首先,下载tomcat.http://tomcat.apache.org/index.html 2. 然后解压.用终端进入到解压文件夹下的bin目录.  ...

  2. ios 向工程里添加Fonts

    ios 向工程里添加Fonts 1.网上搜索字体文件(后缀名为.ttf,或.odf),假如你加入的字体为微软雅黑 2.把字体库导入到工程的resouce中 3.然后在你的工程的Info.plist文件 ...

  3. EF架构~真正被封装的排序方法,支持多列排序

    回到目录 对于linq to sql 和linq to entity来说,当你把获取数据的方法封装了之后,总觉得还缺点什么,想了之后,应该是排序,但看了微软的orchard项目之后,觉得它的排序封装的 ...

  4. Fedora 24 install MySQL

    Background I have work with mysql on the fedora OS, but currently fedora have no support mysql inste ...

  5. 每天一个linux命令(37):date命令

    在linux环境中,不管是编程还是其他维护,时间是必不可少的,也经常会用到时间的运算,熟练运用date命令来表示自己想要表示的时间,肯定可以给自己的工作带来诸多方便. 1.命令格式: date [参数 ...

  6. .NET程序集强命名删除与再签名技术 源代码剖析

    如果你想去除一个程序集的强签名(strong name),目前为止可以有两个途径 1  反编译为IL代码,删除签名部分,再编译为程序集 2  应用Re-Sign程序,直接对一个程序集再签名 生成和读取 ...

  7. How to load a local .CSS file & JavaScript resources using iPhone UIWebView Class

    This post will cover the basic setup and creation of an application with web content for iPhone that ...

  8. JavaScript之毒瘤

    0.导言 JavaScript中有许多难以避免的问题特性.接下来就一一揭示. 1.全局变量 在所有JavaScript的糟糕特性中,最为糟糕的就是全局变量的依赖.全局变量使得在同一个程序中运行独立的子 ...

  9. Ext1.X的CheckboxSelectionModel默认全选之后不允许编辑的BUG解决方案

    Ext1.X的CheckboxSelectionModel默认全选之后不允许编辑的BUG解决方案,ext 的CheckboxSelectionModel在后台默认选中之后,前台就不允许编辑的bug是存 ...

  10. Fiddler的学习

    以下内容转自:http://www.cnblogs.com/TankXiao/archive/2012/02/06/2337728.html 仅为查找方便而复制~~ Fiddler是最强大最好用的We ...