# Any python expert here ?



## cute.bandar (May 14, 2012)

I wrote a small script on xp that I want to distribute. So I tried compiling it using py2exe. It compiles, but the resulting exe throws errors when run.

Link to my script:
[Python] import pyttsx import threading from threading import * import datetime imp - Pastebin.com

Here's my attempt at compiling it using py2exe


> #COMPILE python setup.py py2exe --includes pyttsx.drivers.sapi5
> 
> from distutils.core import setup
> import py2exe
> ...



I also tried pyinstaller , which also compiles, but again with errors. I found this patch here to make it work. But have no clue as to how to apply that patch to pyinstaller. 

Any help please

Thanks


----------



## abhijangda (May 17, 2012)

and whats the error which executable throws??


----------



## cute.bandar (May 21, 2012)

The errors thrown by the executable are: 


> Exception in thread Thread-1:
> Traceback (most recent call last):
> File "speechplay\build\pyi.win32\speechplay\out01-PYZ.pyz\threading", line 530, in __bootstrap_inner
> File "speechplay\build\pyi.win32\speechplay\out01-PYZ.pyz\threading", line 483, in run
> ...




Hi,
I was just compiling another python hello world program and .. long story short I think the problem is with my pythonpath. Can I request someone to bare with me and explain me how to set it right ?
i am on xp . And this is the output of echo %pythonpath%


> D:\Python27\python27.zip;D:\Python27\DLLs;D:\Python27\lib;D:\Python27\lib\plat-win;D:\Python27\lib\lib-tk;D:\Python27;D:\Python27\lib\site-packages;D:\Python27\lib\site-packages\win32;D:\Python27\lib\site-packages\win32\lib;D:\Python27\lib\site-packages\Pythonwin



Is it correct? 
I had pythonpath problems previously as well.
The main warning I get while compiling is this:


> WARNING: library python%s%s required via ctypes not found


any ideas /

thanks


----------

