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. Node.js入门:模块机制

    CommonJS规范      早在Netscape诞生不久后,JavaScript就一直在探索本地编程的路,Rhino是其代表产物.无奈那时服务端JavaScript走的路均是参考众多服务器端语言来 ...

  2. 函数柯理化以及利用柯理化实现bind方法

    1.函数柯理化 把接受多个参数的函数变换成接受一个单一参数(最初函数的第一个参数)的函数,并且返回接受余下的参数而且返回结果的新函数的技术. 柯理化函数思想:一个js预先处理的思想:利用函数执行可以形 ...

  3. jQuery LigerUI 最新版压缩包(含chm帮助文档、源码、donet权限示例)

    jQuery LigerUI 最新版压缩包 http://download.csdn.net/download/heyin12345/4680593 jQuery LigerUI 最新版压缩包(含ch ...

  4. 18.实现如下类之间的继承关系,并编写Music类来测试这些类。

    package zhongqiuzuoye; public class Instrument { public void play() { System.out.println("弹奏乐器& ...

  5. Netty学习二:Java IO与序列化

    1 Java IO 1.1 Java IO 1.1.1 IO IO,即输入(Input)输出(Output)的简写,是描述计算机软硬件对二进制数据的传输.读写等操作的统称. 按照软硬件可分为: 磁盘I ...

  6. 快速入门系列--CLR--01基本概念

    在.NET平台用C#这么久,自然会发现其版本很多,相应的概念也会很多,常常都是萌萌哒.而在实际工作中经常会遇到需要配置dll版本号,公钥token等场景,因而对C#.NET.CLR.框架类型等基础概念 ...

  7. 那些年我们写过的T-SQL(下篇)

    下篇的内容很多都会在工作中用到,尤其是可编程对象,那些年我们写过的存储过程,有木有?到目前为止很多大型传统企业仍然很依赖存储过程.这部分主要难理解的部分是事务和锁机制这块,本文会进行简单的阐述.虽然很 ...

  8. OpenCASCADE Application Framework Data Framework Services

    OpenCASCADE Application Framework Data Framework Services eryar@163.com 一.概述Overview OpenCASCADE的数据框 ...

  9. 移动web开发之屏幕三要素

    × 目录 [1]屏幕尺寸 [2]分辨率 [3]像素密度 前面的话 实际上,并没有人提过屏幕三要素这个词,仅是我关于移动web开发屏幕相关部分总结归纳的术语.屏幕三要素包括屏幕尺寸.屏幕分辨率和屏幕像素 ...

  10. poj1949Chores(建图或者dp)

    /* 题意:n个任务,有某些任务要在一些任务之前完成才能开始做! 第k个任务的约束只能是1...k-1个任务!问最终需要最少的时间完成全部的 任务! 思路:第i个任务要在第j个任务之前做,就在i,j之 ...