"import wx" fails after installing wxPython on Windows XP

I downloaded and installed this version of wxPython for use with my Python 2.6 installation:

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

When I start Python and try to import wx, I get the following error:

C:\Program Files\Console2>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:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 45, in <module> from wx._core import * File "c:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\_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. >>> 

I already tried to remove wxPython and install again, and I got the same error. How can I fix this problem?

+4
source share
9 answers

I was getting the same error.

After some search engines found a link to MSVC ++ 2008 Redestributable and installed it.

This solved the problem.

+3
source

I hate to talk about it, but I had the same problem, and it worked fine after the reboot.

+3
source

Try the ANSI version instead of Unicode. IIRC needs to be consistent with the Python 2.6 installation to work properly.

+1
source

From searching for “wrong application configuration” in wxPython trac system , the only link that might make sense is 64-bit vs 32-bit compatibility issue.

Otherwise, I would say Brian 's answer about trying ANSI is very good.

By the way, if you try to delete it again, go to the package sites folder and make sure that all wx and wxPython files are deleted.

+1
source

Copy the files and manifest of the Microsoft C v.9 runtime library. That is, msvcr90.dll and microsoft.vc90.crt.manifest from the python folder to the wx, tha is folder, the folder in which the DLL could not be started.

Or install the Visual C ++ 2008 Redistributable Package.

+1
source

I have the same problem too. By installing the "Portable Python" IDE, which comes with some good modules, including wxPython. You can immediately start the coding GUI without having to download a separate wxPython. Link, http://www.portablepython.com/

+1
source

It might be too late, but I had the same problem, and I decided that downloading it from my own site : wxPython2.8-win64-unicode -py27 In my case, it originally wanted to install in a place other than my python folder. So I changed it to .. / python 27 / Lib / SitePackages / Then it worked correctly.

Hope this helps.

0
source

Another late answer, but I had problems (8/14), and my solution was to use the 32-bit version instead of the 64-bit version of wxPython.

0
source

you are trying to use wxpython module 2.8.12.1, select your python version. You can download it here:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#wxpython

0
source

All Articles