How to create an executable from python script in windows

Discussion in 'Python' started by Prakash, Nov 28, 2012.

  1. Prakash

    Prakash Guest

    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
    Prakash, Nov 28, 2012
    #1
    1. Advertising

  2. On Tue, 27 Nov 2012 22:32:53 -0800, Prakash wrote:

    > 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.



    --
    Steven
    Steven D'Aprano, Nov 28, 2012
    #2
    1. Advertising

  3. Prakash

    Prakash Guest

    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
    Prakash, Nov 28, 2012
    #3
  4. 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
    Ulrich Eckhardt, Nov 28, 2012
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    15
    Views:
    478
    Dave Thompson
    Aug 21, 2006
  2. pratap
    Replies:
    20
    Views:
    750
    Flash Gordon
    Mar 7, 2007
  3. Jason Cavett
    Replies:
    8
    Views:
    609
    Sanjay
    May 16, 2007
  4. Replies:
    0
    Views:
    427
  5. geoffbache
    Replies:
    5
    Views:
    896
    geoffbache
    Jun 13, 2008
Loading...

Share This Page