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

Can't convert .py script that uses python-docx into .exe

Im using Python 3.6 and I wrote a script in which the user enters data through tkinter GUI and it gets then printed along with some extra text into a WORD doc. All works fine in my Wing IDE but once it comes to converting it to .exe it either shows…
Alexander Ka
  • 259
  • 1
  • 2
  • 11
2
votes
2 answers

No such file or directory error using pyinstaller and scrapy

I have a python script that uses scrapy and I want to make it into an exe file using pyinstaller. The exe file is generated without any error but when I open it an error occurs. FileNotFoundError: [Errno 2] No such file or directory:…
2
votes
1 answer

Subfolders with python code pyinstaller

Assume that this is my file structure: main.py modules |--> feature1.py |--> feature2.py |--> feature3.py My main.py code is as following: from modules.feature1 import Awesomefeature ... I used the following spec-file for PyInstaller: # -*-…
user5989986
  • 73
  • 2
  • 9
2
votes
0 answers

Reduce size of pyqt5 html-viewer application build with pyinstaller

I have a small webview application: from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5.QtWebEngineWidgets import QWebEngineView import sys class MyWebViewer(QMainWindow): def __init__(self, *args, **kwargs): …
Mads M Pedersen
  • 579
  • 6
  • 16
2
votes
1 answer

PyInstaller-packaged PyQt5 app uses wrong style on MacOS

I've packaged a python application written in Python 3.6 with PyQt5 using PyInstaller for MacOS. The application runs correctly, but the interface does not use a native-looking style. Running the program manually does use the correct style, and…
Aidan Wolk
  • 126
  • 1
  • 6
2
votes
1 answer

Pyinstaller fails to import site module in python3 on MacOSX

I am trying to package (freeze) a python3 application using pyinstaller (ver. 3.3.1) After running pyinstaller my_script.py it fails with a list of import errors, the first of which is the following: 292 INFO: checking Analysis 292 INFO: Building…
Salvatore Cosentino
  • 6,663
  • 6
  • 17
  • 25
2
votes
1 answer

Importing modules I do not use

Pyinstaller keeps importing scipy when I exclude it through exclude module. That did not work. I am using Miniconda on Windows. What is going on here?
kiky12pe
  • 23
  • 2
2
votes
2 answers

Python Pyinstaller exe opens multiple instance of tkinter window, Python Firebase [Video]

I have a scraping script of where im using tkinter for ui. When i build the exe(with pyinstaller) and open it it working well, But When i close it, it opens multiple instance of tkinter Window. I cant paste the full code. So i pasted all the tkinter…
Arun K
  • 868
  • 10
  • 17
2
votes
1 answer

How to include Google API JSON credentials file in Pyinstaller?

My first question here. I am hobbyist self-learned python. I know this may be a silly question but I can't find any information after many days of searching. I'm making an app to read data in google spreadsheet using Google API and then outputted…
2
votes
1 answer

How to bundle a python script that imports zerorpc with pyinstaller?

I have the following script called api.py that I'd like to turn into a python app using pyinstaller. The below function works when I run it out of sublime text but when I try to convert it into an unix executable application using pyinstaller, the…
Chris
  • 5,444
  • 16
  • 63
  • 119
2
votes
3 answers

How can I convince PyInstaller, via my spec file, to include libvlc.dll in the EXE it makes?

I can create an EXE with PyInstaller that works on my machine. I labor in hopefulness, not delusion, I hope, that the EXE really is self-contained. However, the EXE does NOT run on other machines. It chokes due to the absence of libvlc.dll, which…
bloodbringer
  • 41
  • 1
  • 4
2
votes
0 answers

tkinter popup dialog works fine running in python 3.5 but not in a pyinstaller build

I have a help pop up dialog that works fine in Linux and Windows where Python 3.5.x is installed but after a pyinstaller build the rest of the app works fine but that pop up is just an empty form void of all five of its widgets. I can’t see anything…
Kevin
  • 157
  • 1
  • 1
  • 7
2
votes
1 answer

Pyinstaller build process cannot locate pywintypes module

Recently updated my computer to Windows 10 and now pyinstaller is throwing an error. This has been working on my Windows 7 computer for as long as I can remember. I have tried uninstalling and reinstalling pyinstaller, win32 extentions, and several…
2
votes
1 answer

AttributeError: LooseVersion instance has no attribute 'version'

I'm working on a python program which reads parquet type file and converts it in to pandas dataframe. It works fine while i use the python command to run it (python framework1.py arg1 arg2). But after converting it to an executable file using…
visuman
  • 140
  • 2
  • 12
2
votes
2 answers

python - Converting a VPython program into an exe

I am currently making a physics simulation using VPython, and want to turn it into an exe file, using pyinstaller, so that it can run on a Mac laptop. Essentially, I have two questions - one short and one long. Short question: will the exe file I…
Momo 6aye3
  • 95
  • 1
  • 7