Python ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。
问题怎么出现的:
电脑是win8 64位,,下载了一个mysqldb 32位,http://sourceforge.net/projects/mysql-python/files/latest/download。安装后import MySQLdb 就出现了如题错误。
看了一个帖子,如下:
在windows上安装python mysql模块后,导入模块时报 python ImportError: DLL load failed: %1 不是有效的 Win32 应用程序
这个是因为你安装了64位的python,然后安装32位的mysql模块,或者你安装了32位的python,然后安装64位的myql模块
怎么查看自己的python是多少位?
C:\Users\ivon>python
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win
32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import MySQLdb
怎么看安装的模块是多少位?
MySQL-python-1.2.3.win-amd64-py2.7.exe
MySQL-python-1.2.5.win32-py2.7.exe
介个就很明显了。
在官网:http://sourceforge.net/projects/mysql-python/ 没有64的提供。
经过搜索,下载到了
MySQL-python-1.2.5.win-amd64-py2.7.exe
,问题解决。
Python ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。的更多相关文章
- python ImportError: DLL load failed: %1 不是有效的 Win32 应用程序
导入的时候报出了 ImportError 在windows上安装python 的模块后,导入模块时报 python ImportError: DLL load failed: %1 不是有效的 Win ...
- ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。
报错 Traceback (most recent call last): File "D:/PyCharm 5.0.3/WorkSpace/2.NLP/2.获取数据源和规范化/4.word ...
- ImportError DLL load failed: %1 不是有效的 Win32 应用程序
操作系统:win7 64位,安装mysqldb 后提示:ImportError DLL load failed: %1 不是有效的 Win32 应用程序,是由于安装的32位的 MySQL-Python ...
- wxPython ImportError DLL load failed: %1 不是有效的 Win32 应用程序 解决办法
原因:python是32位的,装了64位的Wxpython时会报错,具体错误是安装库文件与python的动态库的位数未一致. 特别留意32位/64位指的不是 系统的位数,而是Python的位数. 64 ...
- python import win32clipboard 报错DLL load failed: %1 不是有效的 Win32 应用程序。
在python中引入win32clipboard时报错,DLL load failed: %1 不是有效的 Win32 应用程序 >>> import win32clipboardT ...
- import _mysql----ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。
背景:安装了mysql,练习sql 操作,提示 ImportError DLL load failed: %1 不是有效的 Win32 应用程序 解决方法: 操作系统win10,64位,查看安装的my ...
- from PyQt4.QtGui import * 提示 ImportError: DLL load failed: %1 is not a valid Win32 application.
个人用64位电脑安装了64位的PyQt后 from PyQt4.QtGui import * 提示 ImportError: DLL load failed: %1 is not a valid Wi ...
- python: ImportError:DLL load failed 解决方法。
在学习使用wordcloud 库创建词云过程中,mooc里提到可以使用另一个库函数,来创建不同形状的词云. 就是这句: ... from scipy.misc import imread mk = i ...
- python安装win32api pywin32 后出现 ImportError: DLL load failed
ImportError: DLL load failed: \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\x ...
随机推荐
- tiny4412 linux+qtopia nfs网络文件系统的挂载
1,首先确定uboot启动内核的bootargs参数 Linux-CommandLine = root=/dev/nfs nfsroot=192.168.1.131:/home/tiny4412/ro ...
- django model 数据类型
转自:http://www.cnblogs.com/lhj588/archive/2012/05/24/2516040.html Django 通过 models 实现数据库的创建.修改.删除等操作, ...
- C++类中的static数据成员,static成员函数
C++类中谈到static,我们可以在类中定义static成员,static成员函数!C++primer里面讲过:static成员它不像普通的数据成员,static数据成员独立于该类的任意对象而存在, ...
- java高级---->Thread之Exchanger的使用
Exchanger可以在两个线程之间交换数据,只能是2个线程,他不支持更多的线程之间互换数据.今天我们就通过实例来学习一下Exchanger的用法. Exchanger的简单实例 Exchanger是 ...
- SimpleDateFormat使用详解 <转>
public class SimpleDateFormat extends DateFormat SimpleDateFormat 是一个以国别敏感的方式格式化和分析数据的具体类. 它允许格式化 (d ...
- thinkphp---自动验证的问题
这段时间做一个项目:使用 thinkphp 做了一个自动验证,但是发现如果新增的时候,是能够进行自动验证的,但是在修改的修改的时候,会发现自动验证会失效. 验证的时候,模型是这样写的: protect ...
- flex弹性布局属性详解!
详细看下flex弹性布局具体属性: flex容器属性详解:flex-direction:row/column:(横排/竖排) 决定元素的排列方向:flex-wrap:nowrap/wrap/wrap- ...
- 微信小程序 --- 模板的使用
由于微信小程序文件大小的限制,可以把一些公用的文件 单离出来形成模板,从而被各个模板引用: 定义模板第一种方式: 新建一个目录: 写入: <text>hello world</tex ...
- Hive JOIN使用详解
转自http://shiyanjun.cn/archives/588.html Hive是基于Hadoop平台的,它提供了类似SQL一样的查询语言HQL.有了Hive,如果使用过SQL语言,并且不理解 ...
- 170616、解决 java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.ArrayList
报错截图: 原因:搭建项目的时候,springmvc默认是没有对象转换成json的转换器的,需要手动添加jackson依赖. 解决步骤: 1.添加jackson依赖到pom.xml <!-- j ...