加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

在Windows XP上安装wxPython后,“import wx”失败

发布时间:2020-12-13 22:35:26 所属栏目:Windows 来源:网络整理
导读:我下载并安装了这个版本的 wxPython,用于我的Python 2.6安装: http://downloads.sourceforge.net/wxpython/wxPython2.8-win32-unicode-2.8.9.1-py26.exe 当我运行Python并尝试导入wx时,我收到以下错误: C:Program FilesConsole2pythonPython 2.6 (r26:66
我下载并安装了这个版本的 wxPython,用于我的Python 2.6安装:

http://downloads.sourceforge.net/wxpython/wxPython2.8-win32-unicode-2.8.9.1-py26.exe

当我运行Python并尝试导入wx时,我收到以下错误:

C:Program FilesConsole2>python
Python 2.6 (r26:66721,Oct  2 2008,11:35:03) [MSC v.1500 32 bit (Intel)] on win32
Type "help","copyright","credits" or "license" for more information.
>>> import wx
Traceback (most recent call last):
  File "<stdin>",line 1,in <module>
  File "c:Python26libsite-packageswx-2.8-msw-unicodewx__init__.py",line 45,in <module>
    from wx._core import *
  File "c:Python26libsite-packageswx-2.8-msw-unicodewx_core.py",line 4,in <module>
    import _core_
ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
>>>

我已经尝试删除wxPython并再次安装,我得到了同样的错误.我该如何解决这个问题?

解决方法

我得到了同样的错误.

一些谷歌搜索后发现这个链接到MSVC++ 2008 Redestributable并安装它.

这解决了这个问题.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读