[Tutor] Errors using Simple.py for executables

David Porter jcm@bigskytel.com
Tue, 5 Dec 2000 09:02:30 -0700


* Craig Hagerman <hagerman@mac.com>:
> I need help successfully creating an executable Python file (on Windows 98,
> using Python 1.5.2). I have been trying to do so using Gordon McMillan's
> "Simple.py". (For the record I have had no luck with Freeze or Squeeze
> either :( )

I'll try, though I'm not using windows so I can't test any of this.

> The HelloWorld program :
> 
> >>>print "Hello World"
> >>>print
> >>>print "Press any key to continue..."
> >>>raw_input()

You can change the last two lines into one:

raw_input("Press any key to continue...")

> --------------------------------
> Error Message when running %python Simple.py HelloWorld.py
> ----------------------------------
> 
> 
> Creating HelloWorld.exe
>     C:\Python\support\Run.exe -> HelloWorld.exe
>     C:\WINDOWS/TEMP\~1969873-1 -> HelloWorld.exe
> Gathering components of Install_HelloWorld.exe
> Analyzing python dependencies of gen_install gen_install.py
> Traceback (innermost last):
>     File "C:\Python\Builder.py", line 502, in ?
>         main(opts, args)
>     File "C:\Python\Builder.py", line 484, in main
>         target.buildO
>     File "C:\Python\Builder.py", line 83, in build
>         self.gatherO
>     File "C:\Python\Builder.py", line 381, in gather
>         FullExeTarget.gather(self)
>     File "C:\Python\Builder.py", line 290, in gather
>         ArchiveTarget.gather(self)
>     File "C:\Python\Builder.py", line 256, in gather
>         CollectTarget.gather(self)
>     File "C:\Python\Builder.py", line151, in gather
>         self.toc.merge([resource.makeresource('python15.dll')])
>     File "C:\Python\Builder.py", line 19, in makeresource
>         typ, nm, fullname = finder.identify(name,xtrapath)
>     File "C:\Python\Builder.py", line 121, in identify
>         raise ValueError, "%s not found" % name
> ValueError: python15.dll not found

It says that it can't find python15.dll. This is in fact python in the form 
of a shared library. If I remember correctly it should be installed in
c:\windows\system. If it's not there, run a search for it on your system.
Perhaps you should put a copy of it in c:\python\ and if that doesn't do
anything try putting a copy in the same directory as helloworld.py. 

If that doesn't work, you'll have to wait for the people who actually know
something about windows to respond...

good luck,

  David