py2exe and msvcr90.dll included by program doesnt work help please

858 views Asked by At

System XP and Win 7 Both python 2.6 and 2.7

I created my .exe with 'bundle_files':1 so I only one file and without the .dll and it ran on my computer, then went to a new one w/ out python or the vs distributables - didn't work. Was getting an error of "The system cannot execute the specified program" Did some looking around and figured out I needed the distributables - well installed and worked - but I want to compile w/ the budle_files:1 option so I only have the one .exe file with the .dll and not have to have distibutables on my computer and friends. (I understand you can't bundle this .dll)

I used the example provided in the py2exe guide but the .dll file and .manifest file wasn't in the location it showed so I just copy them to another easier location. It compiles and includes the "Microsoft.VC90.CRT" subfolder but I still get the error when I remove python and the distributables. Here is my script.

from distutils.core import setup
from glob import glob
import os
import sys
import platform
import py2exe


data_files = [("Microsoft.VC90.CRT", glob(r'C:\Documents and Settings\User\Desktop\Temp\dlls\*.*'))]
setup(console=['Script.py'],
    data_files=data_files,
    options = {'py2exe':{'bundle_files':1}},
    zipfile= None,
    ) 

Thanks

1

There are 1 answers

0
khaos11 On BEST ANSWER

Never got an answer, just gave up one py2exe.

Found pyinstaller. Which was able to do it even better than I would have been able to do with py2exe. Instead of having my one .exe file and the the extra .dll directory. It was able to make just the one .exe file and is able to run on systems without python or the redistributables.

Place your script in the directory as the pyinstaller.py script.

cmd > location of scripts

pyinstaller.py --onefile <yourscript>