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
18
votes
3 answers

ImportError: No module named win32timezone when i make a singleone exe from a python script with pyInstaller

I have a script which works when is a py file, but when i use pyInstaller to make one single exe file from that script i will get an error : ImportError: No module named win32timezone. I import in script: import win32serviceutil import…
VladutZzZ
  • 680
  • 1
  • 8
  • 27
18
votes
2 answers

Pyinstaller with relative imports

I'm attempting to make a Pyinstaller build for Windows 7 using Pyinstaller 2.1. The module uses relative imports because the package is typically used in Linux as a 'regular' Python package. Is there a way to create a spec file to handle this type…
durden2.0
  • 9,222
  • 9
  • 44
  • 57
17
votes
3 answers

PyInstaller, spec file, ImportError: No module named 'blah'

I am trying to build a python script via PyInstaller. I have used the following commands to configure, generate a spec file, and build: wget pyinstaller.zip, extracted it, python Configure.py, etc, then: python pyinstaller/Makespec.py --onefile…
Cmag
  • 14,946
  • 25
  • 89
  • 140
17
votes
5 answers

Pyinstaller on a setuptools package

I'm attempting to run PyInstaller on a CLI app I am building in Python using the Click library. I'm having trouble building the project using PyInstaller. PyInstaller has a document in their GitHub wiki titled Recipe Setuptools Entry Point, which…
Scott Crooks
  • 1,523
  • 4
  • 24
  • 39
17
votes
5 answers

Pyinstaller adding splash screen or visual feedback during file extraction

I create a single file python application with Pyinstaller using --onefile parameters. Everything work as expected but the startup time is around 10 seconds on my machine. The problems is that during the file unpacking process of Pyinstaller package…
Marco
  • 487
  • 2
  • 6
  • 25
17
votes
3 answers

Error loading Python dll/ LoadLibrary: The specified module could not be found

I am new at programming. I wrote a small program in python and converted it to .exe file with pyinstaller. Now when i try to open the .exe file a black screen appears and closes immediately. I was able to get a screenshot: I saw a solution like…
Cavid
  • 181
  • 1
  • 1
  • 6
17
votes
6 answers

pyinstaller error: OSError: Python library not found: libpython3.4mu.so.1.0, libpython3.4m.so.1.0, libpython3.4.so.1.0

I'm using Python 3.4.4 on Centos7. I've created a python program on my local machine that makes use of qt modules. The program is running fine on my local machine. I'm now trying to create an executable with pyinstaller. I'm using the…
neilH
  • 3,320
  • 1
  • 17
  • 38
17
votes
7 answers

Pyinstaller image does not load

The Problem Im trying to turn a python file into an EXE file, however I seem to be running into the same problem every single time, whether it is CX_Freeze or Pyinstaller. I just tried using pyinstaller and I made an EXE file using the…
abc1234
  • 260
  • 3
  • 19
17
votes
12 answers

Imported module not found in PyInstaller

I'm working in Windows, using PyInstaller to package a python file. But some error is occuring: Traceback (most recent call last): File "", line 2, in File "D:\Useful Apps\pyinstaller-2.0\PyInstaller\loader\iu.py", line 386, in…
Searene
  • 25,920
  • 39
  • 129
  • 186
16
votes
6 answers

no module named pkg_resources.py2_warn pyinstaller

I'm trying to make an executable file (.exe file for windows) for the code here. The main file to run is src/GUI.py. I found that pyinstaller is a better option to create the exe file. I tried both one folder and single executable file options. I…
Nagabhushan S N
  • 6,407
  • 8
  • 44
  • 87
16
votes
1 answer

PyInstaller creates slow executable

I'm using PyInstaller to create a single executable of a python program using PyQt. It creates the .exe and runs fine, but takes between 15 to 20 seconds to start. I thought I could get by with creating a splash screen so the user would at least…
Stephen
  • 663
  • 5
  • 13
  • 24
16
votes
3 answers

Python Flask as Windows Service

I am trying to get a Flask app to run as a Service in Windows. I have already tried to implement a solution as suggested here and here without success. I have a simple folder with just two files: Project | +-- myapp.py +--…
drec4s
  • 7,946
  • 8
  • 33
  • 54
16
votes
3 answers

pipenv and pyinstaller not packaging dependencies

I'm fairly new to python I'm trying to create an executable of my python project that is run in pipenv. However, when I try and compile and run the code using pyinstaller it can't find any dependencies since they aren't installed globally. I don't…
Mitchell Murphy
  • 231
  • 2
  • 7
16
votes
3 answers

PyInstaller + UI Files - FileNotFoundError: [Errno 2] No such file or directory:

I'm trying to export my .py script to .exe using PyInstaller, which has dependencies on .ui files which were created using Qt Designer. I can confirm that my .py script works just fine when running it through PyCharm - I'm able to see the GUI I've…
giran
  • 368
  • 1
  • 2
  • 11
15
votes
2 answers

Why does my pyinstaller created executable require admin privileges?

I've written a Python program which I distribute using pyinstaller. I've been using the onefile option so far to create a standalone executable. That's been great up until now, but as the application has grown the startup time is getting a bit…
Whatang
  • 9,938
  • 2
  • 22
  • 24