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

Automatic download of appropriate chromedriver for Selenium in Python

Unfortunately, Chromedriver always is version-specific to the Chrome version you have installed. So when you pack your python code AND a chromedriver via PyInstaller in a deployable .exe-file for Windows, it will not work in most cases as you won't…
tim
  • 9,896
  • 20
  • 81
  • 137
15
votes
2 answers

Creating a pyinstaller executable that uses virtualenv imported modules

So, the title basically covers my question. I've created a project using virtualenv, e.g. I have to source ./env/bin/activate to run my script. When I try creating an executable using: pyinstaller --onefile None of the…
Topher Sikorra
  • 161
  • 1
  • 1
  • 5
15
votes
3 answers

how to recompile the bootloader of Pyinstaller

I have an AntiVirus false positive problem of my exe file generated using PyInstaller, by searching i found this answer witch consist of recompiling the bootloader and i just can't get it done. This what i've tried so far: try to install C++…
infantry
  • 336
  • 1
  • 5
  • 15
15
votes
3 answers

pyinstaller add folder with images in exe file

I have a python script called main.py that uses some images in the same path, in images folder. I want to create one exe file that has also the images that are used from main.py script. myprogram |-images_folder |-main.py How I have to do? I am…
michele
  • 26,348
  • 30
  • 111
  • 168
15
votes
2 answers

Speeding up an .exe created with Pyinstaller

I've converted my program (written in Python 3.6.1, converted using Python 3.5.3) from a .py to an .exe using Pyinstaller. However, it is incredibly slow at loading (it takes roughly 16 seconds, compared to the <1 second when running in IDLE), even…
Foxes
  • 1,137
  • 3
  • 10
  • 19
15
votes
1 answer

Python: libpython3.5.dylib not found?

I would like to make a Mac executable for my Python code but always got this error message: OSError: Python library not found: .Python, libpython3.5.dylib, Python Both PyInstaller and py2app returned the same error. What should I do to overcome…
mawgumelar
  • 171
  • 1
  • 5
15
votes
6 answers

Can't run binary from within python aws lambda function

I am trying to run this tool within a lambda function: https://github.com/nicolas-f/7DTD-leaflet The tool depends on Pillow which depends on imaging libraries not available in the AWS lambda container. To try and get round this I've ran pyinstaller…
stevepkr84
  • 1,637
  • 2
  • 13
  • 23
15
votes
1 answer

Executable made with pyInstaller/UPX experiences QtCore4.dll error

A python program, which I compiled with pyInstaller, turned out to be over 400 MB. The program's GUI is based on htmlPY, which is "a wrapper around PySide's QtWebKit library." The large size of the program partly owes to the fact that it utilizes…
Boa
  • 2,609
  • 1
  • 23
  • 38
15
votes
2 answers

pyInstaller changing dll and pyd output location

I'm trying to use pyInstaller to package a wxpython application. I looking for a variation of the "one-folder" mode whereby the dlls and pyds are not stored in the top-level directory but in a subdirectory instead (like "dlls" or "libs"). This is…
dilbert
  • 3,008
  • 1
  • 25
  • 34
15
votes
4 answers

How to convert python .py file into an executable file for use cross platform?

I've been searching through SO for a while now trying to come up with an answer to this but due to my inexperience with programming I don't understand much of the documentation, nor am I confident enough to experiment too much. Would anyone be able…
Ricochet_Bunny
  • 537
  • 3
  • 8
  • 19
14
votes
2 answers

How to convert exe back to Python script

Recently I converted a .py file to a .exe file. I lost the original .py file and I'm left with the exe file. I converted it with pyinstaller. Is there anyway to reverse this to get my original .py file back?
S. Known
  • 195
  • 2
  • 2
  • 10
14
votes
3 answers

Python, PyInstaller error: no module named "Encodings" and system codec missing

I am using Python 3.3.3 and I have been trying to build a .exe from a simple .py script. My script looks like this: import encodings print('Test') and executes correctly. When I try to build it with PyInstaller with this command: pyinstaller…
Zesa Rex
  • 412
  • 1
  • 4
  • 16
14
votes
1 answer

Pyqt4-pyqtgraph application recursively opens new instances of itself

I forked BMDanalyse for my project and have modified it. Setup Instructions in case you need a hand. Actual question follows this. A 64-bit system is required due to memory requirements. Please ensure you have 64bit Python 2.7. The following setup…
Frikster
  • 2,755
  • 5
  • 37
  • 71
14
votes
9 answers

Pyinstaller numpy "Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll"

I'm new with python apps. I'm trying to build my python GUI app with pyinstaller. My app depends on the following packages: PyQt4, numpy, pyqtgraph, h5py. I'm working with WinPython-32bit-3.4.4.1. I build the app with this command: pyinstaller…
f_ciriolo
  • 151
  • 1
  • 1
  • 8
13
votes
1 answer

How do you resolve 'hidden imports not found!' warnings in pyinstaller for scipy?

I'm working on using pyinstaller to create an .exe for a python program that uses pandas and sklearn. The pyinstaller process completes and produces the dist folder with the executable as expected. However, when I run the .exe I get module import…
Luke
  • 781
  • 2
  • 8
  • 11