Can Python 2.5 and 2.7 coexist along with wxPython, py2exe and comtypes (try to resolve MSVCP90.dll problem)?

StackOverflow https://stackoverflow.com/questions/4202822

Question

I was writing a code which uses wxPython and comtypes. I have python 2.7 installed on my machine (Windows) along with wxPython, comtypes and py2exe. while trying to build it I got the following error:

error: MSVCP90.dll: No such file or directory

So, I did research I came to know about two solutions:

1. Copy Microsoft.VC90.CRT.manifest and msvcp90.dll to your machine and prepare your setup like as follows:

from distutils.core import setup import py2exe from glob import glob data_files=[("Microsoft.VC90.CRT", glob(r'c:\shared_dlls*.*'))] setup(data_files=data_files, console=['main.pyw'])

2. Use Python 2.5 along with wxPython, comtypes and py2exe

Now, I have following questions:

In first case: a. Do I need to have Visual Studio license in order to use these files? or that can be used without any worries. b. What if I compile it using aforementioned method? Does it still require MSVC90.dll on the user machine to execute? I think - No. Please correct me if I'm wrong. I want to remove any dependency and give user an exe which the user can directly execute without any dependency.

In Second case: As I have Python_2.7 installed on my machine along with aforementioned modules. I would like to know can I install Python 2.5 on the same machine? Can they co-exist? If yes, do I need to install another copy of wxPython, comtypes and py2exe for this.

Please suggest me what is the best solution. How should I proceed? It's kind of blocking me. Thanks in advance!

Was it helpful?

Solution

Python 2.5 and 2.7 (and all other versions of Python) co-exist very well. You may need to change your path to use the correct version of Python.

You will need to install the Python 2.5 builds of wxPython and py2exe. You will also need to install comtypes for Python 2.5. That installer will detect your Python installations by checking the registry.

OTHER TIPS

I simply downloaded MSVCP90.dll file from here: http://www.dllme.com/dll/files/msvcp90_dll.html and then pasted it into Python27\DLLs. It worked after that.

  1. Did you try to install Visual C++ redistribuables? I think you don't need a VS license for this.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top