在其他版本的mysqldb里面时间查询有问题
最后确定还是在 1.2.5 版本下来解决,需要解决的问题就是这个:
“Cannot open include file: 'config-win.h': No such file or directory” while installing mysql-python

上面是在 1.2.4 版本上的,后来在 1.2.5 上面应该是解决的。但实际上,1.2.5 在Windows 64 位环境下还是有问题的,原因见后面的说明。

安装步骤如下:
1.安装 Microsoft Visual C++ Compiler Package for Python 2.7
下载链接

2.安装 MySQL Connector C 6.0.2
下载链接

大意是说找不到注册表,网上搜索解决方案。

新建一个register.py文件写入代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import sys
  
from _winreg import *
  
# tweak as necessary
version = sys.version[:3]
installpath = sys.prefix
  
regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % (
    installpath, installpath, installpath
)
  
def RegisterPy():
    try:
        reg = OpenKey(HKEY_CURRENT_USER, regpath)
    except EnvironmentError as e:
        try:
            reg = CreateKey(HKEY_CURRENT_USER, regpath)
            SetValue(reg, installkey, REG_SZ, installpath)
            SetValue(reg, pythonkey, REG_SZ, pythonpath)
            CloseKey(reg)
        except:
            print "*** Unable to register!"
            return
        print "--- Python", version, "is now registered!"
        return
    if (QueryValue(reg, installkey) == installpath and
        QueryValue(reg, pythonkey) == pythonpath):
        CloseKey(reg)
        print "=== Python", version, "is already registered!"
        return
    CloseKey(reg)
    print "*** Unable to register!"
    print "*** You probably have another Python installation!"

启动命令切到register.py文件目录下执行

重新安装PIL,错误解决,安装成功。

如果是win7 64位的用户在安装Python 32位程序时,如果选择只为当前用户,以上问题不会出现。如果选择所有用户,就试着使用以上方法解决。

提示其它版本解决方法类似。

win64位安装python-mysqldb1.2.3的更多相关文章

  1. win7 32位安装 python 及Numpy、scipy、matplotlib函数包

    操作系统: win7 64位,但选择安装32位的python. 1,python下载安装 https://www.python.org/downloads/ 下载2.7版,一路下一步安装. 并在pat ...

  2. [置顶] 如何在Windows 7 64位安装Python,并使用Matplotlib绘图

    1.     安装Python 我使用的是Windows 7 64 bit,所以我从Python官网下载python-2.7.5.amd64.msi,安装步骤如下: 1)        安装windo ...

  3. win64位安装python-mysqldb1.2.5

    在其他版本的mysqldb里面时间查询有问题最后确定还是在 1.2.5 版本下来解决,需要解决的问题就是这个:"Cannot open include file: 'config-win.h ...

  4. window7 64位安装Python

    Python下载地址:https://www.python.org/download/releases/2.7.8/ 选择64位的安装,然后双击打开下载的文件,默认一步步安装. 其中有一个步骤如下图: ...

  5. win7 64 位安装 python,提示: 0x80240017-未指定的错误

    首先确保从python官网下载正确的python版本: https://www.python.org/downloads/windows/ 然后,应该是 VC 相关的问题. 去微软网站下载下列补丁包即 ...

  6. 【转】linux和windows下安装python集成开发环境及其python包

    本系列分为两篇: 1.[转]windows和linux中搭建python集成开发环境IDE 2.[转]linux和windows下安装python集成开发环境及其python包 3.windows和l ...

  7. linux和windows下安装python拓展包及requirement.txt安装类库

    python拓展包安装 直接安装拓展包默认路径: Unix(Linux)默认路径:/usr/local/lib/pythonX.Y/site-packagesWindows默认路径:C:\Python ...

  8. 在win64位,python64位2.7版本中安装pyHook

    今天看了一篇博文说的是利用pyhook监听键盘鼠标事件(感兴趣的可以看博客园中相关文章),文章中使用的pyHook模块的官方下载地址是:http://sourceforge.net/projects/ ...

  9. 怎样在Win7 64位旗舰版安装Python+Eclipse开发环境

    原地址:http://www.cnblogs.com/balian/archive/2011/06/19/2084632.html 自从上周抛弃了WinXP转而安装了Win7,64位后,尝试安装Pyt ...

随机推荐

  1. Stopwatch + C#打印日志方法

    打印一个接口.方法的运行时间在程序中是很容易遇到的一件事情:现在,我就分享一个我在工作中使用的临时打印日志的方法和结合 Stopwatch 打印测量某个时间间隔的运行时间的方法. Stopwatch ...

  2. Ubuntu下使用终端ssh访问设置了密钥的云服务器

    首先先安装OpenSSH客户端,可以直接apt-get安装 sudo apt-get install openssh-server 然后将私钥权限修改为600 chmod 600 keyfile 最后 ...

  3. CSS2属性选择器和css3选择器的用法和区别

    兄弟们,这是我第一次写博客,希望对进来的人有用,写的不好别喷哈,谢谢. css2属性选择器: 1.[attribute] 例子:   [title] 解释:   选择含有  title  属性的所有元 ...

  4. 注册mySQL到JDBC驱动程序方法浅谈

    一.注册方法(4种) 1)服务提供者框架: 符合JDBC 4.0规范的驱动程序包含了一个文件META-INF/services/java.sql.Driver,在这个文件中提供了JDBC驱动实现的类名 ...

  5. Python开发【第三篇】:函数&读写文件

    三元运算 三元运算,是条件语句的简单的写法.如果条件为真,则返回值1,否则,返回值2. ret = 值1 if 条件 else 值2 深浅拷贝 对于数字(int)和字符串(str)而言,赋值.深拷贝. ...

  6. C. Playlist Educational Codeforces Round 62 (Rated for Div. 2) 贪心+优先队列

    C. Playlist time limit per test 2 seconds memory limit per test 256 megabytes input standard input o ...

  7. 更改django的时区

    TIME_ZONE='Asia/Shanghai' datetime_obj.replace(tzinfo=(pytz.timezone("Asia/Shanghai"))).st ...

  8. vue组件详解——使用slot分发内容

    每天学习一点点 编程PDF电子书.视频教程免费下载:http://www.shitanlife.com/code     一.什么是slot 在使用组件时,我们常常要像这样组合它们: <app& ...

  9. ubuntu1604安装谷歌游览器

    https://www.linuxidc.com/Linux/2016-05/131097.htm 在终端中依次运行如下命令: sudo add-apt-repository ppa:a-v-shko ...

  10. pytorch visdom可视化工具学习—1—详细使用-3-Generic Plots和Others

    4)Generic Plots 注意,服务器API遵循数据和布局对象的规则,这样您就可以生成自己的任意Plotly可视化: # Arbitrary visdom content trace = dic ...