I am trying to use py2exe and now I am just having problems creating the samples and tutorials that come with py2exe. I run setup.py and that is fine, but when I try to run the exe that is being created, I get the error "LoadLibrary (pythondll) failed". I have not moved exe from the dist directory, and I see that python27.dll is in this dist directory. Does anyone know what could happen?
In case that matters, I am running 32-bit python 2.7 with the corresponding 32-bit python 2.7 py2exe on Windows 7.
thanks
The test.py file just contains print "test"
Here my setup.py is based on what Kirk wrote:
from distutils.core import setup import py2exe import sys from glob import glob project_folder = r'C:\\Python27\\Lib\site-packages\\py2exe\\samples\\test\\' data_files = [ ("dlls", glob(project_folder + r'dlls\\*.dll')) ,("pyds", glob(project_folder + r'pyds\\*.pyd')) ] options = { } setup( name='test' ,options = options ,zipfile = None ,data_files=data_files ,console=['test.py'] )
Anshu source share