Questions tagged [pyinstaller]

PyInstaller is a multi-platform tool designed to convert Python (.py) files into stand-alone executable files on Windows, Linux, macOS, Solaris, and AIX.

PyInstaller is a multi-platform tool designed to convert Python (.py) files into standalone executable files on Windows, macOS, Linux, FreeBSD, Solaris, and AIX. These executable files can run on a system without Python installed, but are OS-dependent, meaning that the executable has to be generated from a machine with the same operating system than the machine in which it will run (for instance, it is not possible to generate an executable from macOS and then run it on Windows).

It is designed to be compatible with many third-party modules such as PyQt, Django or matplotlib without requiring configuration or plugins.

PyInstaller is open source software, distributed under the GPL. It works out of the box with any Python version 2.7 / 3.5-3.7.

The latest version of Pyinstaller is available on GitHub http://www.pyinstaller.org/

Usage

Install PyInstaller from PyPI:

pip install pyinstaller

Go to your program’s directory and run:

pyinstaller yourprogram.py

This will generate the bundle in a subdirectory called dist.

6448 questions
40
votes
3 answers

Can I control the architecture (32bit vs 64bit) when building a pyinstaller executable?

Short Question Is there any way to control / guarantee the architecture (32bit vs 64bit) when building a pyinstaller executable? Background I migrated from py2exe to pyinstaller because of the lack of 64bit support along with a host of small…
Adam Lewis
  • 7,017
  • 7
  • 44
  • 62
40
votes
3 answers

How can I create the minimum size executable with pyinstaller?

I am on Windows 10, I have anaconda installed but I want to create an executable independently in a new, clean minimal environment using python 3.5. So I did some tests: TEST1: I created a python script test1.py in the folder testenv with…
esperluette
  • 1,792
  • 2
  • 14
  • 21
39
votes
10 answers

pyinstaller creating EXE RuntimeError: maximum recursion depth exceeded while calling a Python object

I am running WinPython 3.4.4.3 with pyinstaller 3.2 (obtained via pip install pyinstaller). Now I've got some really simple Qt4 code that I want to convert to EXE and I've run into problem that I cannot solve. The Code: import sys import math from…
H_Four
  • 501
  • 1
  • 5
  • 6
39
votes
2 answers

Which is better - PyInstaller or cx_Freeze?

Could someone tell me which is better of the two for bundling Python applications — cx_Freeze or PyInstaller? I'm looking for a comparison based on factors such as: Popularity (i.e. larger user base) Footprint of the built binary Cross platform…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
39
votes
4 answers

Installer and Updater for a python desktop application

I am building a desktop app with python and packaging it to an exe with Pyinstaller. I would like to ship my application with an installer and also provide automatic and silent updates to the software like Google Chrome, Dropbox or Github for…
Thomaschaaf
  • 17,847
  • 32
  • 94
  • 128
38
votes
6 answers

which build tool(s) do you recommend for python?

I'm starting a small/medium-sized python project, likely in Test Driven Development. My backgrounds are more in C and java than python (I used ant and makefile) I know that in python you might not need a build tool, but I will, because I'll use…
Davide
  • 17,098
  • 11
  • 52
  • 68
38
votes
19 answers

Pyinstaller is not recognized as internal or external command

I am trying to use pyinstaller in cmd but I receive error: C:\Users\username>pyinstaller 'pyinstaller' is not recognized as an internal or external command, operable program or batch file. C:\Users\username> When I use this command in the…
user8533214
  • 391
  • 1
  • 3
  • 4
36
votes
17 answers

pyinstaller No module named pyinstaller

I have 2 python versions installed under my mac osx sierra: python 3.5 python 2.7 I installed pyinstaller under python3.5 with this command: python3.5 -m pip install pyinstaller If I run again the same command I'm getting: Requirement already…
pempem
  • 403
  • 1
  • 4
  • 8
35
votes
5 answers

How to build multiple .py files into a single executable file using pyinstaller?

I have made a small PyQt application containing 5-6 .py files. Now I want to build and compile them into a single main file, meaning it has to operate from one main window exe. My .py files are connected with each other successfully. I have used…
Nabeel Ayub
  • 1,060
  • 3
  • 15
  • 35
34
votes
3 answers

Comprehensive tutorial on Pyinstaller?

I'm looking for a tutorial on PyInstaller that will explain things like how to create .pkg files how to include/exclude modules how to include data files inside the install directory. I cannot make much sense out of the standard PyInstaller…
Brandon
  • 3,684
  • 1
  • 18
  • 25
33
votes
9 answers

Pyinstaller "Failed to execute script pyi_rth_pkgres" and missing packages

This is my first time posting a question here as most of my questions have already been answered by someone else! I am working on a GUI application in python and am attempting to use pyinstaller to package it into a single folder and .exe for…
gurnben
  • 331
  • 1
  • 3
  • 5
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
2 answers

PyInstaller not working on simple HelloWorld Program

So I am running on 64-bit Windows 7, and I set up Pyinstaller with Pip and PyWin32. I have python 2.7. I made a simple hello world Program with this code print "hello world!" I put the file in the same directory as PyInstaller, and ran this code in…
user1768884
  • 1,079
  • 1
  • 20
  • 34
31
votes
7 answers

Add configuration file outside PyInstaller --onefile EXE file into dist directory

Situation I'm using PyInstaller on Windows to make an EXE file of my project. I would like to use the --onefile option to have a clean result and an easy-to-distribute file/program. My program uses a config.ini file for storing configuration…
Stefano Giraldi
  • 1,211
  • 2
  • 13
  • 22
30
votes
7 answers

Configuring Pycharm to run Pyinstaller

Yes I want to create a run configuration in PyCharm to run Pyinstaller and get my executable. According to the Pyinstaller documentation you should be able to locate an python script called pyinstaller-folder/pyinstaller.py after the installation,…
gerosalesc
  • 2,983
  • 3
  • 27
  • 46