Questions tagged [py2exe]

Py2exe is a python extension that converts Python Scripts to Windows Executables.

py2exe is a extension which converts Python scripts (.py) into Windows executables (.exe). These executables can run on a system without Python installed. It is the most common tool for doing so.

py2exe was used to distribute the official BitTorrent client (prior to version 6.0) and is still used to distribute SpamBayes as well as other projects.

Resources

1654 questions
28
votes
4 answers

Auto updating a python executable generated with pyinstaller

I have a desktop app that I'm working on and I am using PyInstaller to generate de distribution files. I have chosen PyInstaller over py2exe because it is very easy to use and I don't need to care about windows dlls, but when I use py2exe I can…
Fernando Freitas Alves
  • 3,709
  • 3
  • 26
  • 45
27
votes
2 answers

Py2exe lxml woes

I have a wxpython application that depends on lxml and works well when running it through the python interpreter. However, when creating an exe with py2exe, I got this error ImportError: No module named _elementpath I then used python setup.py…
jack the lesser
  • 701
  • 2
  • 7
  • 15
26
votes
1 answer

Cannot install py2exe with Python 2.7

I am trying to install py2exe. I have Python 2.7 installed on my machine. Their website mentions that they have released support for 2.7, but when I try to install, it mentions that Python Version 2.6 required, which was not found in the registry. I…
floyd1510
  • 391
  • 1
  • 6
  • 14
23
votes
1 answer

Can 64-bit python create 32-bit Windows executables

I have a new 64-bit Windows machine and use python for various things and so would prefer to install 64-bit python. However, one of my python projects creates a Windows executable that is then run on a 32-bit Windows machine (created using…
blokeley
  • 6,726
  • 9
  • 53
  • 75
21
votes
2 answers

Building executables for Python 3 and PyQt

I built a rather simple application in Python 3.1 using PyQt4. Being done, I want the application to be distributed to computers without either of those installed. I almost exclusively care about Windows platforms, so my goal is to have a single…
20
votes
2 answers

py2exe + sqlalchemy + sqlite problem

I am playing around with getting some basic stuff to work in Python before i go into full speed dev mode. Here are the specifics: Python 2.5.4 PyQt4 4.4.3 SqlAlchemy 0.5.2 py2exe 0.6.9 setuptools 0.6c9 pysqlite 2.5.1 setup.py: from distutils.core…
Jason Miesionczek
  • 14,268
  • 17
  • 76
  • 108
20
votes
4 answers

Hiding console window of Python GUI app with py2exe

I have a Python program uses Qt (PyQt4 in fact) and when I launch it from its main.py, I get a console window and the GUI window (on Windows, of course). Then I compile my program with py2exe and main.exe is successfully created. However, if I run…
ahmet alp balkan
  • 42,679
  • 38
  • 138
  • 214
20
votes
3 answers

Python Windows service pyinstaller executables error 1053

I have written a Windows service in python. If I run my script from the command prompt python runService.py When I do this the service installs and starts correctly. I have been trying to create an executable using pyinstaller because i've seen…
user1385894
  • 201
  • 1
  • 2
  • 4
20
votes
4 answers

how can i get the executable's current directory in py2exe?

I use this bit of code in my script to pinpoint, in a cross-platform way, where exactly it's being run from: SCRIPT_ROOT = os.path.dirname(os.path.realpath(__file__)) Pretty simple. I then go on to use SCRIPT_ROOT in other areas of my script to…
Chris Lamberson
  • 201
  • 1
  • 2
  • 3
19
votes
4 answers

Error: "MSVCP90.dll: No such file or directory" even though Microsoft Visual C++ 2008 Redistributable Package is installed

I'm trying to build a package from source by executing python setup.py py2exe This is the section of code from setup.py, I suppose would be relevant: if sys.platform == "win32": # For py2exe. import matplotlib sys.path.append("C:\\Program…
claws
  • 52,236
  • 58
  • 146
  • 195
18
votes
2 answers

Does PyPy work with Py2Exe?

Does PyPy work with Py2Exe? If it doesn't, are there any similar solutions?
Varriount
  • 663
  • 5
  • 18
18
votes
9 answers

Py2Exe: DLL load failed

When trying to use py2exe to convert a simple Python game I made into exe format, it gave me the following error: Traceback (most recent call last): File "C:\Users\Tali\Desktop\2exe.py", line 4, in setup(console=['test.py']) File…
Niv
  • 379
  • 2
  • 3
  • 8
18
votes
1 answer

python NameError: name '__file__' is not defined

i try compile this script whit py2exe : import os file1 = os.path.dirname(os.path.realpath('__file__')) file2 = os.path.realpath(__file__) setup script : from distutils.core import setup import py2exe import sys, os if len(sys.argv) == 1: …
kingcope
  • 1,121
  • 4
  • 19
  • 36
18
votes
1 answer

Creating single EXE using py2exe for a Tkinter program

I'm trying to use minty's solution provided on this link to generate a single exe file for my Tkinter based program: py2exe - generate single executable file Here's what I wrote in the setup.py: from distutils.core import setup import py2exe, sys,…
Muhammad Farhan
  • 359
  • 2
  • 4
  • 12
17
votes
3 answers

Cross-platform alternative to py2exe

py2exe is great, and I use it whenever I want to package up a python program to run on a Windows system. My question is, is there an equivalent tool that I can use to package up the program on Windows, but that I can then run on Linux?
xorsyst
  • 7,897
  • 5
  • 39
  • 58