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
2
votes
0 answers

pyinstaller add folder beside executable exe?

i'm trying to add folder called 'old method' beside my executable script and am gonna make it one exe program but the problem is i need to add this folder to Collecting together . i tried it by that method here using a Tree but it doesn't seems…
Fathy
  • 377
  • 5
  • 13
2
votes
2 answers

need help to compile python with pyinstaller

I want to distribute my python code on machines running windows 7+. It consists of a couple of .py files with the main in cprofiles_lmfit.py, together with a file cprofiles.ui to describe the GUI and a .pdf for the doc. I had a hard time (see build…
Stéphane
  • 1,389
  • 3
  • 13
  • 34
2
votes
2 answers

PySide (LGPL) : example for dynamic linked libraries for an executable application

Unfortunately I found no examples for this topic. I want to deploy my own application written by python and I using PySide (LGPL-licensed) for GUI surface. How can I link libraries dynamically? (in this case the application has not be opensource).…
Python_nub
  • 21
  • 2
2
votes
2 answers

How to debug a PyInstaller .spec file?

Suppose I have a minimal PyInstaller spec file, e.g. the hello_world.spec that is created when I run pyinstaller hello_world.py (also see docs). This spec file has python code but no import statements. Now suppose I customize this file, e.g. using…
djvg
  • 11,722
  • 5
  • 72
  • 103
2
votes
4 answers

How to build executable with pyinstaller that uses pycryptodome?

I'm trying to build the following script that uses pycryptodome: # based on this example http://www.codekoala.com/posts/aes-encryption-python-using-pycrypto/#comment-25921785 from Crypto.Cipher import AES from Crypto import Random import…
Pablo
  • 983
  • 10
  • 24
2
votes
2 answers

Selenium don't work after exporting to EXE in windowed mode in pyinstaller

I am making an PyQt4 application where I need to use selenium. Everything works fine while development but when I exported to single file EXE, by pyinstaller and without console, it produces following traceback error: [WinError6] The handle is…
Ahmad Taha
  • 1,975
  • 2
  • 17
  • 27
2
votes
1 answer

Manually specify library when pyinstaller sees conflicting versions

Is it possible to manually replace or specify the location of a .dylib on Mac OSX when using pyinstaller? I'm getting the error when trying to open my completed .app Traceback (most recent call last): File "DeepMeerkat/main.py", line 3, in…
bw4sz
  • 2,237
  • 2
  • 29
  • 53
2
votes
1 answer

Make pyinstaller executable find its own name?

How do I make a executable compiled with pyinstaller find its own name? I need this to make it copy itself to startup. Or is there another way to achieve this? file only finds the original name of the script, not the executable.
Jorrit Wegman
  • 93
  • 1
  • 7
2
votes
2 answers

pyinstaller: app won't run on other computers?

I used PyInstaller to successfully turn a very basic python program (that prints a few things to the console) into a one file executable on my MacBook Pro: Everything works fine when I run it on my computer. When I send it to friends, however, it…
Johnny Metz
  • 5,977
  • 18
  • 82
  • 146
2
votes
0 answers

pyinstaller is creating an empty Dist folder

I have python 3.6.1 32 bit and the updated pyinstaller as of 8/15/17 I've tried pyinstaller.exe --onefile xxxx.py from within the directory housing my file also: pyinstaller.exe xxxx.py and... pyinstaller xxxx.py The folders are created,…
Charlie-5
  • 43
  • 1
  • 5
2
votes
2 answers

pyinstaller exe without any dependencies?

So I'm using pyinstaller with python27, and my exe works great so long as it's in the same directory as the build folder. I need it to be a completely standalone exe, without any dependencies, is there a way to bundle the important things from the…
user3150635
  • 509
  • 2
  • 9
  • 26
2
votes
0 answers

Getting WinError 10002 error after freezing my code with pyinstaller

Update: This seems to be connected specifically to the an issue with pyinstaller freezing the socket package. Running the following code is fine in python, but after freezing to an exe with pyinstaller it gives the OSError. import socket try: …
2
votes
0 answers

pyinstaller (Index Error: tuple index out of range) with correct version of Python

Ok so I have a fairly simple python program that utilizes tkinter and win32 to modify an existing excel sheet. I'm attempting to package it as an .exe with pyinstaller. I've read all the information about the 'tuple out of range' error regarding…
Ian
  • 33
  • 3
2
votes
0 answers

Pyinstaller can't create .app on mac

I create a small app using PyQt5.9. when I run python3 setup.py bdist_mac to create an .app on mac, I got following error. copying /Library/Frameworks/Python.framework/Versions/3.5/lib/QtCore.framework/Versions/5/QtCore ->…
Thu Ra
  • 2,013
  • 12
  • 48
  • 76
2
votes
1 answer

Python opencv cv2 cap.read() returns None in PyInstaller on Windows

I have an ethernet camera and the following test code (BasicVideo.py) that works perfectly and does not produce any errors. By "works perfectly" I mean an image window appears and the camera images is displayed: import cv2 def…
Casey
  • 475
  • 6
  • 19