Questions tagged [py2exe]

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

py2exe
Filter by
Sorted by
Tagged with
188 votes
8 answers
591k views

How can I convert a .py to .exe for Python?

I'm trying to convert a fairly simple Python program to an executable and couldn't find what I was looking for, so I have a few questions (I'm running Python 3.6): The methods of doing this that I ...
user7396807's user avatar
  • 1,909
154 votes
8 answers
202k views

py2exe - generate single executable file

I thought I heard that py2exe was able to do this, but I never figured it out. Has anyone successfully done this? Can I see your setup.py file, and what command line options you used? Basically I'm ...
Greg's user avatar
  • 46.2k
45 votes
13 answers
198k views

How can I call a Python script on Excel VBA?

I am trying to call a Python script on VBA, and I am new to this. I tried converting the main script to an EXE file using py2exe and then calling it from VBA (shell), but the main script calls other ...
Ege Ozlem's user avatar
  • 923
109 votes
6 answers
90k views

IndexError: tuple index out of range when using py2exe

I'm currently trying to make an executable using py2exe. I use Python 3.6. The script I'm using imports openpyxl and pptx and runs fine when I use Pycharm or run the script using the command window. ...
Dennis's user avatar
  • 1,201
18 votes
3 answers
8k views

multiprocessing problem [pyqt, py2exe]

I am writing a GUI program using PyQt4. There is a button in my main window and by clicking this button. I hope to launch a background process which is an instance of a class derived from ...
Bing Jian's user avatar
  • 1,024
78 votes
8 answers
107k views

Process to convert simple Python script into Windows executable [duplicate]

I wrote a script that will help a Windows user in her daily life. I want to simply send her the .exe and not ask her to install python, dlls or have to deal with any additional files. I've read ...
greye's user avatar
  • 9,031
32 votes
5 answers
60k views

Py2exe for Python 3.0

I am looking for a Python3.0 version of "py2exe". I tried running 2to3 on the source for py2exe but the code remained broken. Any ideas?
user61695's user avatar
  • 321
72 votes
7 answers
94k views

Packaging a Python script on Linux into a Windows executable

I have a Python script that I'd like to compile into a Windows executable. Now, py2exe works fine from Windows, but I'd like to be able to run this from Linux. I do have Windows on my development ...
Chinmay Kanchi's user avatar
20 votes
4 answers
23k views

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 ...
Chris Lamberson's user avatar
10 votes
12 answers
6k views

Enabling JPEG support for QImage in py2exe-compiled Python scripts?

I'm trying to use a JPEG image in a QImage object from a Python script, with PyQt4. The script itself works perfectly, the image loads and can be manipulated and rendered and all. However, when I ...
Etienne Perot's user avatar
8 votes
4 answers
9k views

Running compiled python (py2exe) as administrator in Vista

Is it possible to programaticly run compiled Python (comiled via py2exe) as administrator in Vista? Some more clarification: I have written a program that modifies the windows hosts file (c:\Windows\...
UnkwnTech's user avatar
  • 89.5k
7 votes
3 answers
2k views

Pygame2Exe Errors that I can't fix

I made a "Game". I love playing it, and I would like to distribute it to my friends without having to install Python and Pygame on their computers. I did a lot of research on Py2Exe and Pyinstaller. ...
Casshern's user avatar
52 votes
11 answers
63k views

py2exe fails to generate an executable

I am using python 2.6 on XP. I have just installed py2exe, and I can successfully create a simple hello.exe from a hello.py. However, when I try using py2exe on my real program, py2exe produces a few ...
Charles Anderson's user avatar
8 votes
1 answer
24k views

making exe file from python that uses command line arguments

I want to create an exe from a python script that uses command line arguments (argv) From what I've seen py2exe doesn't support command-line-arguments What can I do? EDIT: I was using a GUI2Exe ...
Boaz's user avatar
  • 4,904
49 votes
4 answers
32k views

Are there any alternatives to py2exe? [closed]

Are there any alternatives to py2exe?
daniels's user avatar
  • 18.8k
20 votes
4 answers
21k views

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 ...
ahmet alp balkan's user avatar
28 votes
5 answers
25k views

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 ...
Fernando Freitas Alves's user avatar
15 votes
2 answers
13k views

Make a py2exe exe run without a console?

Does anyone know how to make an exe with py2exe run without the black console? and bundle up all the pyd files etc into just one exe file?
P'sao's user avatar
  • 2,966
5 votes
3 answers
8k views

Python py2exe window showing (tkinter)

I'm trying to make an exe by py2exe. The program is showing a popup-like window using Tkinter. The problem is, everything works fine when I run the setup like this: setup(windows = [{'script': "msg....
mopsiok's user avatar
  • 565
33 votes
1 answer
29k views

multiprocessing.freeze_support()

Why does the multiprocessing module need to call a specific function to work when being "frozen" to produce a windows executable?
Voo's user avatar
  • 29.5k
29 votes
4 answers
126k views

How to decompile an exe file compiled by py2exe?

How to decompile an exe file compiled by py2exe? just one exe file, didn'n have any zip file. how to decompile to pyc or pyo file?
toontong's user avatar
  • 377
16 votes
2 answers
9k views

scipy with py2exe

I get the following error message using python v2.7.3 and scipy v0.11.0 with py2exe v0.6.10 on a 64 bit machine using 64 bit versions of the packages from Christoph Gohlke. If anyone can provide ...
chandradog's user avatar
15 votes
1 answer
4k views

Relative import error with py2exe

I was trying to generate an executable for a simple Python script. My setup.py code looks like this: from distutils.core import setup import py2exe setup(console=["script.py"]) However, I am getting ...
multigoodverse's user avatar
3 votes
1 answer
2k views

build a .exe for Windows from a python 3 script

I would like building an executable for a python 3 script that: imports pyqtgraph (with pyqt5) imports theano and pymc3 also imports numpy, scipy, sys, os opens a simple GUI made with qt designer and ...
Stéphane's user avatar
  • 1,334
23 votes
1 answer
16k views

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 ...
blokeley's user avatar
  • 6,886
7 votes
4 answers
18k views

Py2exe - win32api.pyc ImportError DLL load failed

I am trying to use py2exe to distribute a python application I have written. Everything seems to go OK, but when I run it on another machine it fails with the following error: Traceback (most recent ...
user avatar
6 votes
1 answer
19k views

py2exe "include" modules: when should they be managed manually?

When is it necessary to specify modules to include? Doesn't py2exe search and include whatever is needed per: http://www.py2exe.org/index.cgi/FAQ? And why does it include modules that are not being ...
tosa's user avatar
  • 411
4 votes
2 answers
14k views

How would I combine multiple .py files into one .exe with Py2Exe

I used PyQt to make a GUI for my program, but it has multiple .py files, 2 are them are classes, and one launches the code. So I was wondering, how would I combine them into one whole program? Here ...
Casey's user avatar
  • 508
3 votes
2 answers
7k views

Python - how can i hide the windows command prompt screen when the script is running?

How can i remove this black command prompt screen from the desktop when my python script is running? I made the service.py script into exe using python 2 exe. All worked fine but when the .exe is ...
user avatar
2 votes
1 answer
1k views

Py2exe, Runtimeerror with tweepy

I wanted to use the python plugin for twitter called tweepy. in my main.py file I just imported tweepy import tweepy My setup-file looks like this: from distutils.core import setup import py2exe ...
cre8's user avatar
  • 13.2k
33 votes
6 answers
78k views

python: Can I run a python script without actually installing python?

I have some .py files I wrote that I want to run on a different machine. The target machine does not have python installed, and I can't 'install' it by policy. What I can do is copy files over, run ...
ccwhite1's user avatar
  • 3,675
28 votes
8 answers
37k views

Is there a py2exe version that's compatible with python 3.5?

I am trying to compile my python 3.5 file with the latest py2exe version 0.9.2.2 with the following command: py -3.5 -m py2exe.build_exe myscript.py But it reports this: "run-py3.5-win-amd64.exe" ...
Avantha De Silva's user avatar
27 votes
2 answers
10k views

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 ...
jack the lesser's user avatar
18 votes
9 answers
30k views

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 ...
Niv's user avatar
  • 379
17 votes
3 answers
32k views

Cross-platform alternative to py2exe [closed]

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 ...
xorsyst's user avatar
  • 8,087
13 votes
4 answers
11k views

Fixing SSL certificate error in exe compiled with py2exe (or PyInstaller)

I've just finished testing a Python programme which involves logging into a site and requires a CSRF cookie to be set. I've tried packaging it as an exe using py2exe and got a socket error. I have the ...
Jamie Bull's user avatar
  • 13.2k
11 votes
3 answers
24k views

ImportError: No module named cycler

I am using wxpython and matplotlib to develop a software, when I complete my work, I want to convert the python files to *.exe file by py2exe, so it can be used in Windows. Here is the setup.py file. ...
Elivis's user avatar
  • 307
10 votes
3 answers
7k views

Py2exe: Embed static files in exe file itself and access them

I found a solution to add files in library.zip via: Extend py2exe to copy files to the zipfile where pkg_resources can load them. I can access to my file when library.zip is not include the exe. I add ...
jean-michel's user avatar
6 votes
3 answers
5k views

compiling a python program that uses pygame into an executable

I wanted to compile my python program that uses pygame into an executable using py2exe but I'm experiencing some problems. I run the script in the windows command line and it seems to work. It ...
user avatar
4 votes
2 answers
6k views

Opening an EXE of my Pygame program gives me import errors

I made an MP3 player with pygame code: from Tkinter import * import pygame import glob import tkFont songs=[] for x in glob.glob('C:\WhaleTunes\Downloaded/*mp3'): songs.append(x) Admin=Tk() num=...
P'sao's user avatar
  • 2,966
3 votes
2 answers
8k views

Using #-*- coding: utf-8 -*- does not remove "Non-ASCII character '\x90' in file hello.exe on line 1, but no encoding declared" error

I'm trying to convert a python file into an executable. So far so good. But when I try to run the executable I get the following error message: SyntaxError: Non-ASCII character '\x90' in file hello....
user3285362's user avatar
3 votes
4 answers
17k views

Having py2exe include my data files (like include_package_data)

I have a Python app which includes non-Python data files in some of its subpackages. I've been using the include_package_data option in my setup.py to include all these files automatically when making ...
Ram Rachum's user avatar
  • 86.2k
2 votes
1 answer
2k views

Outputed py2exe exe won't run only when signed: ImportError

So, I've got a program I made in python 2.6, it ran fine as normal python, and ran fine when made into an exe via py2exe v0.6.9. I used signtool to sign it, having changed nothing else, and it stops ...
nixjdm's user avatar
  • 121
44 votes
4 answers
104k views

No module named builtins

I'm trying to convert my .py script into an executable using py2exe. I've had a number of issues so far that have been largely addressed by the "options" in the setup file below. But now I have a ...
Charlie_M's user avatar
  • 1,311
21 votes
3 answers
20k views

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 ...
user1385894's user avatar
15 votes
2 answers
9k views

UnknownTimezoneError Exception Raised with Python Application Compiled with Py2Exe

I'm having a problem distributing an application that utilizes pytz. I'm using Py2Exe to create an executable from my Python source. For a simple example of the problem I'm having, I have: pytz_test....
Lance's user avatar
  • 399
14 votes
5 answers
12k views

py2exe to generate dlls?

Is there a way using py2exe or some other method to generate dll files instead of exe files? I would want to basically create a normal win32 dll with normal functions but these functions would be ...
Brian R. Bondy's user avatar
14 votes
6 answers
43k views

ImportError: no module named py2exe

I get this error when I try to use one of the py2exe samples with py2exe. File "setup.py", line 22, in ? import py2exe ImportError: no module named py2exe I've installed py2exe with the installer,...
Reshure's user avatar
  • 3,325
14 votes
5 answers
13k views

Access denied using Py2exe

I'm using Py2exe to create an executable as a windows service. When I run the script I get this error: File "C:\TeamCity\buildAgent\work\582d895bd5b431ac\winpython\WinPython-32bit-2.7.3.3\python-2....
Be.St.'s user avatar
  • 4,161
14 votes
6 answers
10k views

ImportError: cannot import name RAND_egd

I've tried to create an exe file using py2exe. I've recently updated Python from 2.7.7 to 2.7.10 to be able to work with requests - proxies. Before the update everything worked fine but now, the exe ...
Milano's user avatar
  • 18.5k

1
2 3 4 5 6