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
186
votes
8 answers

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 have found so far are as follows downloading an old…
user7396807
  • 1,889
  • 3
  • 9
  • 5
154
votes
8 answers

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 thinking of it giving me a single executable file…
Greg
  • 45,306
  • 89
  • 231
  • 297
109
votes
6 answers

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. The output produces the error: IndexError: tuple…
Dennis
  • 1,201
  • 2
  • 8
  • 10
78
votes
8 answers

Process to convert simple Python script into Windows executable

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 plenty of the stackoverflow entries regarding compiling…
greye
  • 8,921
  • 12
  • 41
  • 46
67
votes
6 answers

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 machine, but Linux is my primary dev platform and I'm…
Chinmay Kanchi
  • 62,729
  • 22
  • 87
  • 114
52
votes
11 answers

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 information messages but fails to generate…
Charles Anderson
  • 19,321
  • 13
  • 57
  • 73
49
votes
4 answers

Are there any alternatives to py2exe?

Are there any alternatives to py2exe?
daniels
  • 18,416
  • 31
  • 103
  • 173
48
votes
5 answers

Install py2exe for python 2.7 over pip: this package requires Python 3.3 or later

>>> python -c "import sys; print sys.version" 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] >>> pip --version pip 1.5.5 from C:\Python27\lib\site-packages (python 2.7) >>> pip install py2exe RuntimeError:…
Bruno Gelb
  • 5,322
  • 8
  • 35
  • 50
44
votes
13 answers

How to call python script on excel vba?

Trying to call a python script on Vba and I am a newb. I tried converting the main script to an exe using py2exe and then calling it from VBA (shell) but the main script calls other scripts therefore it becomes complicated and I messed it up (my exe…
Ege Ozlem
  • 903
  • 2
  • 9
  • 8
42
votes
4 answers

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 problem that I have not been able to find a solution…
Charlie_M
  • 1,281
  • 2
  • 16
  • 20
33
votes
6 answers

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 my stuff, and then remove them. What I tried was…
ccwhite1
  • 3,625
  • 8
  • 36
  • 47
33
votes
1 answer

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
  • 29,040
  • 11
  • 82
  • 156
32
votes
5 answers

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
  • 321
  • 1
  • 3
  • 4
28
votes
4 answers

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
  • 367
  • 1
  • 3
  • 7
28
votes
8 answers

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" file is not found in the …
Avantha De Silva
  • 321
  • 1
  • 3
  • 3
1
2 3
99 100