How to create an executable from python script in windows

P

Prakash

I had created a python script which actually uses pywin32 com. It opens fewexcel files and process it and produce output. Whenever I try to create anwindows exe file usin py2exe it diplays error. Please guide me I am a noobin creating windows executable. Thanks in advance
 
S

Steven D'Aprano

I had created a python script which actually uses pywin32 com. It opens
few excel files and process it and produce output. Whenever I try to
create an windows exe file usin py2exe it diplays error. Please guide me
I am a noob in creating windows executable. Thanks in advance


Would you like us to guess what the error is? I love guessing games!

My guess is... "File not found". You need to give the right name for the
file. Am I close?

If my guess was wrong, you need to tell us what the error is.
 
P

Prakash

It says like

*** copy extensions ***
*** copy dlls ***
copying C:\Python24\lib\site-packages\py2exe\run_w.exe -> C:\Program Files (x86)\Notepad++\dist\build-check-test.exe
Adding python24.dll as resource to C:\Program Files (x86)\Notepad++\dist\build-check-test.exe
The following modules appear to be missing
['win32com.shell']

*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,
you may or may not need to distribute them.

Make sure you have the license if you distribute any of them, and
make sure you don't distribute files belonging to the operating system.

ole32.dll - C:\Windows\system32\ole32.dll
OLEAUT32.dll - C:\Windows\system32\OLEAUT32.dll
USER32.dll - C:\Windows\system32\USER32.dll
IMM32.dll - C:\Windows\system32\IMM32.dll
SHELL32.dll - C:\Windows\system32\SHELL32.dll
ntdll.dll - C:\Windows\system32\ntdll.dll
comdlg32.dll - C:\Windows\system32\comdlg32.dll
COMCTL32.dll - C:\Windows\system32\COMCTL32.dll
ADVAPI32.dll - C:\Windows\system32\ADVAPI32.dll
MFC71.DLL - C:\Python24\lib\site-packages\Pythonwin\MFC71.DLL
msvcrt.dll - C:\Windows\system32\msvcrt.dll
WINSPOOL.DRV - C:\Windows\system32\WINSPOOL.DRV
GDI32.dll - C:\Windows\system32\GDI32.dll
VERSION.dll - C:\Windows\system32\VERSION.dll
KERNEL32.dll - C:\Windows\system32\KERNEL32.dll
SETUPAPI.dll - C:\Windows\system32\SETUPAPI.dll
KERNELBASE.dll - C:\Windows\system32\KERNELBASE.dll
RPCRT4.dll - C:\Windows\system32\RPCRT4.dll
 
U

Ulrich Eckhardt

Am 28.11.2012 07:43, schrieb Prakash:
copying C:\Python24\lib\site-packages\py2exe\run_w.exe
^^^^^^^^

Python 2.4 was released 8 years ago and shouldn't be used for new
development or learning any longer. The first step I would take is to
upgrade to 2.7, which is the last in the 2.x series.

Further, I would at least consider upgrading to Python 3.x, although
this might require some tweaking of your sourcecode first. Keep in mind
that 2.x is a dead end though!

The following modules appear to be missing
['win32com.shell']

If the warning persists with 2.7 and you are actually getting errors at
runtime, throw the whole message at e.g. google.com and click a few
links. Hint: This is a known problem, you are not the first one!


Good luck!

Uli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top