[PyInstaller] Can't build a hello world on Windows XP in Cygwin

432 views
Skip to first unread message

Jono

unread,
May 24, 2010, 5:10:40 PM5/24/10
to PyInstaller
I've been trying to figure this out for a few days, and scoured the
net to see if anyone else hit it. I'm trying to build a one line hello
world EXE in XP, and it always fails saying there is no run.exe in the
loader directory. There are plenty of other run_*.exe files though. I
must be missing something big. (FWIW I got this to work without a
problem on OS X).

Cheers,
Jono

---
Running Windows XP in a VM, latest Cygwin with all packages installed,
clean svn co of pyinstaller, Python 2.5.4, and the following commands:

$ python tools/pyinstaller/Configure.py
$ python tools/pyinstaller/Makespec.py --name "helloworld" scripts/
hello.py
$ python tools/pyinstaller/Build.py helloworld.spec
...
checking PYZ
checking PKG
building because tools/pyinstaller/support/useUnicode.py changed
building PKG outPKG3.pkg
checking EXE
building because name changed
building EXE from outEXE2.toc
Traceback (most recent call last):
File "tools/pyinstaller/Build.py", line 1370, in <module>
main(args[0], configfilename=opts.configfile)
File "tools/pyinstaller/Build.py", line 1348, in main
build(specfile)
File "tools/pyinstaller/Build.py", line 1308, in build
execfile(spec)
File "scb2scz.spec", line 12, in <module>
console=True )
File "tools/pyinstaller/Build.py", line 798, in __init__
self.__postinit__()
File "tools/pyinstaller/Build.py", line 258, in __postinit__
self.assemble()
File "tools/pyinstaller/Build.py", line 936, in assemble
exe = checkCache(exe, self.strip, self.upx and config['hasUPX'])
File "tools/pyinstaller/Build.py", line 565, in checkCache
digest = cacheDigest(fnm)
File "tools/pyinstaller/Build.py", line 534, in cacheDigest
data = open(fnm, "rb").read()
IOError: [Errno 2] No such file or directory: 'tools/pyinstaller/
support/loader/run.exe'

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To post to this group, send email to pyins...@googlegroups.com.
To unsubscribe from this group, send email to pyinstaller...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.

Giovanni Bajo

unread,
May 25, 2010, 6:55:15 AM5/25/10
to pyins...@googlegroups.com
On Mon, 2010-05-24 at 14:10 -0700, Jono wrote:
> I've been trying to figure this out for a few days, and scoured the
> net to see if anyone else hit it. I'm trying to build a one line hello
> world EXE in XP, and it always fails saying there is no run.exe in the
> loader directory. There are plenty of other run_*.exe files though. I
> must be missing something big. (FWIW I got this to work without a
> problem on OS X).

Did you build the bootloader, just like you would on Linux or Mac?
--
Giovanni Bajo :: ra...@develer.com
Develer S.r.l. :: http://www.develer.com

My Blog: http://giovanni.bajo.it
Last post: Grey on black: combining greylisting with blacklists

Jono Spiro

unread,
May 25, 2010, 7:48:21 PM5/25/10
to pyins...@googlegroups.com
I wasn't aware that I needed to -- I was following the instructions in the README:
Installation in brief
=====================
 Non-Windows users should first build the bootloader:
    cd source/linux
    python ./Make.py
    make

I'm not sure how to build it on Windows -- it looks like you're using Visual Studio (which I don't have, though I could get). Perhaps you could update the README with instructions?

I tried copying one of the other existing run_*.exes in the directory to run.exe and it gave me an unusable exe in the end -- Windows refused to run it.

- Jono

Florian Höch

unread,
May 26, 2010, 7:19:01 AM5/26/10
to pyins...@googlegroups.com
Hi,

> I wasn't aware that I needed to -- I was following the instructions in
> the README:
>
> Installation in brief
>
> =====================
>
> Non-Windows users should first build the bootloader:
>
> cd source/linux
>
> python ./Make.py
>
> make
>
>
> I'm not sure how to build it on Windows -- it looks like you're using
> Visual Studio (which I don't have, though I could get). Perhaps you
> could update the README with instructions?

Cygwin is not Windows - so the above instructions for non-windows do apply.

Regards
--
Florian Höch

mzib...@gmail.com

unread,
May 26, 2010, 7:28:18 AM5/26/10
to pyins...@googlegroups.com
Jono píše v Po 24. 05. 2010 v 14:10 -0700:

> Running Windows XP in a VM, latest Cygwin with all packages installed,
> clean svn co of pyinstaller, Python 2.5.4, and the following commands:

Just to make sure:

What is your purpose of using cygwin?

Are you using the cygwin version of Python?

Jono Spiro

unread,
May 26, 2010, 6:00:51 PM5/26/10
to pyins...@googlegroups.com
Because I'm using a makefile and am most familiar with Cygwin; and there aren't really any good Windows building instructions that I am aware of -- I didn't know you could do it any other way.

I built the bootloader. The fact that the directory is named "linux" threw me off -- maybe it's worth renaming bootloader, and mentioning that Cygwin is included. Run.exe now exists.

So now the EXE builds (I'm not using --onefile to keep things simple), but when I run it, nothing happens (at least Windows doesn't say it's not an application) -- I've tried a simple print statement on its own, and:
if __name__ == "__main__":
print "hi"
and nothing prints out. I've tried running it in cmd.exe and in cygwin.

I am using Cygwin's python. I've been trying to use the standard win32 installer of Python, but get errors when trying to build the bootloader (let alone trying any later steps) -- it fails in both Cygwin and in CMD:

python tools/pyinstaller/source/linux/Make.py
Traceback (most recent call last):
  File "tools/pyinstaller/source/linux/Make.py", line 207, in <module>
  File "tools/pyinstaller/source/linux/Make.py", line 174, in main
ValueError: Makefile 'C:\Python25\Lib\config\Makefile' not found
make: *** [enterprise] Error 1

Rather than me running around guessing -- are there clear instructions to build helloworld on Windows, in any configuration?

Thanks for the replies -- keep them coming :)
- Jono


Giovanni Bajo

unread,
May 27, 2010, 5:14:25 AM5/27/10
to pyins...@googlegroups.com
On Wed, 2010-05-26 at 15:00 -0700, Jono Spiro wrote:
> Because I'm using a makefile and am most familiar with Cygwin; and
> there aren't really any good Windows building instructions that I am
> aware of -- I didn't know you could do it any other way.

The manual is pretty clear, did you read that?
http://www.pyinstaller.org/export/latest/tags/1.4/doc/Manual.html?format=raw

It explicitly says:
============================================================
Note: Windows users can skip this step, because PyInstaller already
ships with binary bootloaders.
============================================================

> I built the bootloader. The fact that the directory is named "linux"
> threw me off -- maybe it's worth renaming bootloader, and mentioning
> that Cygwin is included. Run.exe now exists.

As I said, Cygwin is not really supported at this point, I think there
is not even a feature request open in the Trac. I would not hold my
breath about it -- but if you are really interested in it and want to
come up with a patch yourself, I can provide some guidance.

> So now the EXE builds (I'm not using --onefile to keep things simple),
> but when I run it, nothing happens (at least Windows doesn't say it's
> not an application) -- I've tried a simple print statement on its own,
> and:
> if __name__ == "__main__":
> print "hi"
> and nothing prints out. I've tried running it in cmd.exe and in
> cygwin.

Try building in debug+console mode (you need both the debug build of the
bootloader, that should have been built already, and running Makespec.py
with --debug --console). Look at the output and see what it is going on.

> I am using Cygwin's python. I've been trying to use the standard win32
> installer of Python, but get errors when trying to build the
> bootloader (let alone trying any later steps) -- it fails in both

> Cygwin and in CMD: [...]

>
> Rather than me running around guessing -- are there clear instructions
> to build helloworld on Windows, in any configuration?

The manual has a complete walkthrough that covers all supported
operating systems, see the section "Getting Started". If you try with
the official Python version on Windows (which is not cygwin), you can
follow the instructions for Windows.

Jono Spiro

unread,
May 27, 2010, 3:49:58 PM5/27/10
to pyins...@googlegroups.com
Thanks Giovanni. I did read the manual many times -- hence not building the bootloaders. I wasn't aware that Cygwin didn't mean "Windows" in the case.

I'll keep hacking away and report back if I still can't figure it out. Thanks for the assist.

- Jono

--
Reply all
Reply to author
Forward
0 new messages