3

With some useful answers of my previous question (See below), I decided to give py2exe another try.

I tried the tutorial from py2exe.org (http://www.py2exe.org/index.cgi/Tutorial), but got an error at step 3. I did 1 and 2 exactly as told, and put both files (hello.py and setup.py) in my main folder where I installed python in: D:\Programs\Python.

When running the 'code' form step 3 I got the following error, totally on the bottom of the output: "ImportError: DLL load failed: %1 is not a valid Win32-application.*" I've got a screenshot of the entire output, but I don't know where to upload it.

Extra information: I have 64bit Windows 7 (profesional) and Python 2.7.3 (first I had 3.3.0, but downgraded because of some reasons). It is not a big problem for me to change to another version. I downloaded py2exe 0.6.9.

Note: I couldn't choose between py2exe for 32- or 64bit. I guess then a error should show up earlier, but it might be handy to know.

*I literally translated the last part from Dutch, so it can be slightly different then English pc's.

Previous question:

What is the easiest .py to .exe converter? I've tried a few converters, of which cx_Freeze and py2exe. Using cx_Freeze was too complicated (I couldn't find a good tutorial) and py2exe gave some errors. Before I'm going to try to understand one of these two or try another one, I want some input which converter you think is the best, and I need a good tutorial. I have barely experience with cmd, and am quite a newbie if it comes to programming/python, so I am looking for the easiest-to-use converter. If you say I really need some cmd experience, please direct me to a cmd tutorial/course.

Cœur
  • 37,241
  • 25
  • 195
  • 267
speedy-MACHO
  • 103
  • 1
  • 7
  • you mean you want a compiler? not all python scripts can be compiled, without generating a HUGE .exe as you have to embed the entire python interpreter within the exe – Marc B Mar 12 '13 at 19:21

4 Answers4

3

you can use GUI2exe that's the easiest way im my opinion !

You wont learn much about the converter's but it gets the job done without any problems.

ps. GUI2exe isnt a converter , its a gui to use the converters!

andsoa
  • 500
  • 1
  • 6
  • 11
  • Thanks, with GUI2Exe I can understand wat I'm doing! Still, py2exe is giving me errors. I will try it with cx_Freeze... – speedy-MACHO Mar 13 '13 at 09:59
0

What kind of erros does py2exe give you? That is what I use and it works like a charm for me.

  • I tried the tutorial from the py2exe.org (http://www.py2exe.org/index.cgi/Tutorial) and I only got to step 3, when I type python setup.py py2exe it gives a big list, and on the end is the following error: ImportError: DLL load failed: %1 is geen geldige Win32-toepassing (I'm Dutch, a rough translation of that last part: %1 is not a valid Win32-aplication) I put the hello.py and the setup.py file in my python installation folder (D:\Programs\Python) – speedy-MACHO Mar 12 '13 at 20:07
0

I've used py2exe previously. I assume you've looked at the tutorial on the py2exe project page?

There is also a good one available on the Python Library page.

I used py2exe for complicated Python/Qt/PyQt applications. The biggest thing you'll need to know about that is that the MSVCP90.dll file is needed. You can get that from Microsoft. You'll then need to copy it and the other files mentioned in it's license to the Python DLLs directory. Detailed instructions are available on the py2exe tutorial (Step 5)

Andy
  • 49,085
  • 60
  • 166
  • 233
0

Try py2exe and cx-freeze. These are the two most common ones you'll find out there. Most others are generally a derivative of cx-freeze

inspectorG4dget
  • 110,290
  • 27
  • 149
  • 241