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 creates working binary in container, but not in server

i have a larger project, based on python. there are some external modules like cement, PIL or boto3 in it as well as some own coded modules. everything working fine as it should. my idea now was to compile the whole application to a single binary…
cpassion
  • 21
  • 3
2
votes
1 answer

PyInstaller error on Windows

I'm trying to compile some Script with PyInstaller on Windows. The script are using PySide and OpenPyXL libraries. I was installed all the dependencies with PIP (PySide, OpenPyXL, PEFILE and PyInstaller). My script doesn't use any unicode character,…
Edgar Benítez
  • 131
  • 1
  • 2
  • 4
2
votes
2 answers

ImportError: DLL load failed: The specified module could not be found. Failed to execute script pyi_rth_qt5plugins

##Python code## import sys from math import * from PyQt5.QtCore import * from PyQt5.QtWidgets import (QApplication, QDialog, QLineEdit, QTextBrowser, QVBoxLayout) class Form(QDialog): def __init__(self, parent=None): …
John
  • 51
  • 1
  • 6
2
votes
2 answers

How to Specify Python Version PyInstaller Uses?

I have Python 2.7 & 3.5 on my system. I'm using OS X 10.12. Python 2.7 is the default on the system. When building PyInstaller using... pyinstaller myscript.py ...PyInstaller uses Python 2.7. Perhaps I missed it, but I can't find anywhere in…
Emily
  • 2,129
  • 3
  • 18
  • 43
2
votes
2 answers

Python exe not deleting itself

I'm trying to create a python script to convert into exe which just deletes itself. When I run it as .py file it works. The code is this: import os os.remove(os.getcwd + "\\test.py") I'm working in Windows that's why I'm using \\ and the file is…
2
votes
2 answers

Python - 'No suitable library found for ods' Pyinstaller

I wrote a script that opens and fetches values from .ods file and creates a new sheet and writes values using pyexcel and pyexcel_ods3 . After converting into an executable I get this error No suitable library found for ods . Code : sheet =…
Guhan
  • 21
  • 2
2
votes
1 answer

How to add relative directory while packaging executable python with pyinstaller?

I have a python project that has a following files tree: \main_dir gui.py data.py \lib \files file1.txt file2.txt ... more_dirs and files in lib. The gui.py imports data.py. data.py parses file1.txt…
2
votes
0 answers

importing more than one module while making .py file executable

I need to import more than two modules _utils and typedefs while making my python script executable. For one module I am adding '--hidden-import=modulename' at the end of pyinstaller script. But for two column I came to know hooks are useful. But I…
Yogesh
  • 1,384
  • 1
  • 12
  • 16
2
votes
0 answers

A PyInstaller packaged wxPython simple Hello-World app crashes on macOS

Running (windowed) wxPython Hello-World on macOS fails. PyInstaller: both 3.2 and 3.3.dev0+8892e11 Python: 2.7.12 wxPython: 3.0.2.0 osx-cocoa OS: macOS Sierra 10.12.2 The hello world example: #!/usr/bin/env python import wx app = wx.App(False) #…
LtMerlin
  • 165
  • 1
  • 6
2
votes
0 answers

Running PyInstaller on Mac OS X and I get hidden import issues with gtk

I am using PyInstaller in Mac OS X with Python 2.7.11 and have encountered issues when trying to generate the single file distributable using pyinstaller --onefile devprog.spec. To summarise the output, I see: 4622 INFO: Loading module hooks... 4622…
Darren
  • 41
  • 4
2
votes
2 answers

AttributeError: 'Settings' object has no attribute 'TEMPLATE_CONTEXT_PROCESSORS'

Installed Django 1.10.4 and started a project by name test_py. After that created an app by name test_app1. After creating the app planned to create a installer to run this as a standard-alone app. Trying to make windows installer using Django…
arasub
  • 447
  • 5
  • 10
2
votes
2 answers

pyinstaller exe not running - No module named Pyside

My program works fine if run from Python. I am now packaging this into an exe using Pyinstaller. pyinstaller --onefile path/to/my/file.py I am able to run the exe and so is anyone else if Python is installed on their system. If Python is not…
Eoin
  • 357
  • 1
  • 4
  • 20
2
votes
2 answers

Python script as a safe exe and maybe even a Windows Store App?

I have a Python script which I ran pyInstaller on to create a portable windows exe which runs on Windows 7,8, and 10 devices. I signed the exe with Certum Open Source code signature. The app works great but I am finding: Windows Smartscreen warns…
whyameye
  • 83
  • 1
  • 7
2
votes
1 answer

Package a kivy app into one single exe

I have created an app with kivy (using a .kv) which I would like to package into one single .exe file. Using PyInstaller you can add the option --onefile but this does not work when you package using the spec file. This is my spec file: # -*- mode:…
FredericFox
  • 105
  • 1
  • 8
2
votes
0 answers

PyQt5 ImportError after running standalone executable created by PyInstaller

I have a fully working PyQt5 project, now trying to make a standalone executable that is preferably OS independent. I am using PyInstaller-3.2 in ubuntu 14.04 for this purpose. Tried the following command. pyinstaller --additional-hooks-dir=. -F…
Ahsanul Haque
  • 10,676
  • 4
  • 41
  • 57
1 2 3
99
100