Search code examples
pythonwxpythonpy2exe

wxPython MSVCP90.dll error


Man I am exhausted...I am running python 2.7 and have created an application with wxPython. When attempting to create and .exe with py2app, I get the following error:

error: [Errno 2] No such file or directory: 'MSVCP90.dll'

I have read tons of posts that say that the addition of this file into my into my c:\python27\DLLs directory will do the trick. Unfortunately, I have done that and the error remains. Any help would be appreciated.


Solution

  • My few cents:

    • Use PyInstaller. Advantages: Will work without further ado for wxPython. Actively developed, has recipes AKA hook files for almost every library, even for the hard ones. Disadvantage: does not rely on distutils/setuptools, so if there is no recipe for your (non-pure python) library, you have to deal with the non-python dependencies yourself (distutils/setuptools recipes do not work).
    • For py2exe (I suppose this is what you are talking about): You cannot just simply copy the DLL over, you have to use a manifest file. Check this wxPython-wiki entry to see what this all is about. Furthermore you have to deal with the distribution of the DLL yourself (by either installing Python 2.7 on the target machine, installing the runtime distributable from Microsoft yourself on the target machine or use a helper library like Esky, which can be configured to include the manifest and care for copying of the DLL itself).