wxPython之ImportError: DLL load failed: %1 is not a valid Win32 application.
来源:互联网 发布:网络会计兼职 编辑:程序博客网 时间:2024/05/16 02:40
今天碰到的一个问题,首先本人的机器是win7 64位,装的python是2.7版本。
想要使用wxPython,所以安装了 wxPython3.0-win64-3.0.2.0-py27.exe
在Python IDLE里,输入import wx, 报出如下错误:
>>> import wxTraceback (most recent call last): File "<pyshell#0>", line 1, in <module> import wx File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\__init__.py", line 45, in <module> from wx._core import * File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\_core.py", line 4, in <module> import _core_ImportError: DLL load failed: %1 is not a valid Win32 application.
研究了下,是因为装的Python是32位的,而wxPython是64位的,所以当import wx时,需要32位的wx DLL。
解决方法:
重新安装32位的wxPython, 如:wxPython3.0-win32-3.0.2.0-py27.exe
然后执行import wx,就成功了。如下:
0 0
- wxPython之ImportError: DLL load failed: %1 is not a valid Win32 application.
- Py第十六问 ImportError: DLL load failed: %1 is not a valid Win32 application
- ImportError: 'DLL load failed: %1 is not a valid Win32application.
- %1 Is Not a Valid Win32 Application
- %1 is not a valid Win32 application
- Wxpython ImportError DLL load failed: %1 不是有效的 Win32 应用程序
- .exe is not a valid Win32 application
- 安装python2.7(windows),wxpython: import wx:ImportError:DLL load failed:%1不是有效的Win32应用程序
- class 'mongoClient' not found php_mongo.dll is not a valid Win32 application for windows
- ImportError DLL load failed: %1 不是有效的 Win32 应用程序
- ImportError: DLL load failed: %1 Ч Win32 Ӧ ó
- ImportError:DLL load failed:%1 不是有效的Win32应用程序
- ImportError DLL load failed: %1 不是有效的 Win32 应用程序
- ImportError DLL load failed: %1 不是有效的 Win32 应用程序
- wxpython ImportError: DLL load failed: 找不到指定的模块
- windows启动node程序出现ERROR in %1 is not a valid Win32 application
- 解决安装gulp时 %1 is not a valid Win32 application 的问题
- numpy ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。
- Material Design 中文版(持续更新)
- Python 类的魔力特性之一:property
- InputDispatcher: MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
- Hql语句之uniqueResult()-hql只返回一个结果
- CURL使用示例之数据采集
- wxPython之ImportError: DLL load failed: %1 is not a valid Win32 application.
- LeetCode——Missing Number
- 什么是回调(爱哥出品)
- C++Primer第五版 12.1.1节练习
- Python生成验证码
- Android Bluetooth蓝牙开发(一)
- 3.1.5 窗口的创建
- C++标准库和标准模板库
- 注意:json字符串与json对象的区别