Questions tagged [pyinstaller]

1

votes
1

answer
36

Views

Easiest way to create executable for windows from a Python on Linux environment

I want to make a Python 3.6 program which I develop on Ubuntu into an executable for windows. From what I searched online it seems I will need pyinstaller over wine. If there is an easier way, you can stop reading here, and suggest another way. I tried to follow the answer on Cross-compiling a Pytho...
user1565969
-2

votes
0

answer
15

Views

why .exe that build by pyinstaller work differently from .py?

i wrote an easy malware in python, and i use pyinstaller to convert the code from .py to .exe, but the exe file doesn't works like the .py one. some of the functions are not works when i run the exe, and the main run in loops. I have a hypothesis that this is a problem with the pyinstaller and the i...
0

votes
0

answer
2

Views

exe created by pyinstaller fails to extract data file - fopen error

I've created an exe from python package using pyinstaller. I did use the specfile and supplied data files to the datas field and also used --add-data flag when running pyinstaller in cmd. When i run the exe i get the following message: D:\Source\test_py_exe\....\template.json could not be extracted!...
Caffeine
12

votes
2

answer
393

Views

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 +-- win32_service.py Inside myapp.py is a simple Flask app: from flask import...
drec4s
0

votes
0

answer
6

Views

Discord.py after pyinstaller I get RuntimeError

Making a Discord bot using Discord.py[voice] the bot joins, leaves, plays youtube audio in channels all that perfectly when I run it inside of PyCharm, but when I convert it to an .exe using: pyinstaller --icon=icon.ico Bot_Spud.py And then run the .exe, join a voice channel and I get this RuntimeEr...
Liam McCullough
1

votes
0

answer
150

Views

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 other things. Any ideas what could be wrong with m...
Michael Thornbrugh
1

votes
0

answer
238

Views

Cythonised application not updating

I'm using an updating script and trying to get it to work with cython. It seems the pyupdater script is ignored (no print and not updating). It works fine with standard python, but calling a pyx file it seems it skips over this so no print and update. If python main.py (Calls a cython script there...
1

votes
0

answer
370

Views

Pyintaller Error:pkg_resources.DistributionNotFound: The 'setuptools' distribution was not found and is required by the application

I am trying out to build an executable binary for my python project using Pyinstaller.I can able to build the project successfully.But when I execute the binary it throws below error message. exec(bytecode, module.__dict__) File 'setuptools/command/easy_install.py', line 48, in File '/usr/local/lib...
huozhl
1

votes
0

answer
192

Views

python to exe use pyinstaller module comtypes get error

anyone. When I debugging python the code works very well , but when I made it as an EXE file using pyinstaller : pyinstaller test.py when i run the exe file it occurs error is : No such file or directory: c:\Db\dist\test\gen\_00020905_0000_0000_C000_000000000046_0_8_4.py please help
panda001
1

votes
0

answer
145

Views

Unable to convert .py script to .exe file using pyinstaller

I have installed pyinstaller. It supports python 3.6. But still if i run this command i am getting warnings everytime. The .exe file is not being created. How to do that? I am getting warning like: 516808 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\users\akhil\appdata\loc...
Akhil Reddy
1

votes
0

answer
36

Views

Python Compile to executable or otherwise formatted

I am using Python to create a program for university, however, I included the PyMySQL library as a reference and have a .Ico file for the Icon of the program. Is there anything I can use to compile the multiple .py files and libraries with the Icon to a format that won't require the user to install...
Ayden
1

votes
0

answer
264

Views

PyInstaller issue with creating working executable

I've created a Windows 64-bit desktop app and it works when I run it from Spyder (part of Anaconda) and I'm using pyinstaller 3.3.1 (using the terminal within Anaconda) to create an EXE, the CLI code I'm using is: pyinstaller --clean -w -F -i 'C:\Users\User\Python_program\icon.ico' program.pyw I go...
hsc1000
1

votes
1

answer
226

Views

Kivy PyInstaller very large package size in Linux

I am trying to package a code almost 2kb size for linux using PyIntaller, package size is almost 250mb, according to code there is nothing special is imported. How to reduce this size? i am new to packaging all other codes i tried have same package size, here are my imports. from kivy.app import App...
1

votes
0

answer
264

Views

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 app does not work. Pyinstaller works only if I dont...
Chris
1

votes
1

answer
179

Views

After attempted compile, Python/Kivy application won't launch

I have created a program that I'm attempting to compile, but after the compiling has finished and I attempt to launch the application from the .exe inside the /dist/ directory, it creates a command prompt window, opens the application window for a brief moment, then closes. I have followed the Kivy...
Tylor Mansur
1

votes
1

answer
328

Views

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 PDF file with a nice picture of the pre-formatted la...
Harin Yu
1

votes
0

answer
37

Views

PyInstaller: Support cmd and Gui mode?

Is there a way to make my PyInstalled Pythoncode run either in CMD or in GUI mode? My intention is: If the user drops a file to my .exe file, I want to immediately start processing it (and therefore show the results within the CMD window as usual), if the user does not drop a file, I want to show a...
tim
1

votes
0

answer
160

Views

Python 3.6 tk ScrolledText on TopLevel won't insert

I am having issues with the code below when I use Pyinstaller to compile an executable. I am attempting to open a second GUI window using TopLevel, adding a ScrolledText widget to it, then take the output of ipconfig /all and put it in the ScrolledText. I stripped the code down to just the code rele...
D.Rowland
1

votes
0

answer
38

Views

What does: “error: invalid command 'bdist'” mean?

I'm trying to convert a python script into a standalone executable, and it stops at 'error: invalid command 'bdist''with both cx_freeze as well as with py installer. I can not find what this error means, would you have any suggestions? As requested in the comment, this is the main code, in Renaming_...
a.t.
1

votes
0

answer
299

Views

pyinstaller compiled scripts crash because of missing modules

I've tried compiling a Python program on my Mac, and all went well. I then moved to ubuntu, and can't even compile a hello world correctly: I wrote the simplest hello world: print('hello world') then tried compiling it using: pyinstaller --onefile hello.py everything seemed to be fine, until I tried...
shayelk
1

votes
1

answer
78

Views

Using Pyomo with PyInstaller

Is it possible to create a standalone executable file with PyInstaller which solves an optimization problem with Pyomo? For example, I can solve the optimization problem min_x {2*x_1 + 3*x_2 : x_i >= 0, 3*x_1 + 4*x_2 >= 1} by creating a file 'concreteProblem.py' with the following contents from __fu...
Garrett
1

votes
0

answer
168

Views

sklearn.linear_model causing ImportError when opening .exe created with PyInstaller

this is my first post to stackoverflow, though I've been utilizing this site for a good long while now. Excited to be in the community. (I'm fairly new to python, and especially to PyInstaller) I'm developing a data exploration GUI based on tkinter that relies heavily on pandas and numpy and also ut...
Tariq
1

votes
0

answer
24

Views

Running python executable on a target machine

Is it possible to run my python executable on target machine without the dll's? I have used pyinstaller and it runs perfectly fine on a target machine but the problem with using pyinstaller is the size of the folder that it creates. My script uses the selenium webdriver. Is it possible to create an...
Sakshi
1

votes
2

answer
1k

Views

Pyinstaller Maximum Recursion Depth Exceded

I am trying to create an executable from python 3.6.4 using pyinstaller 3.3.1. The packages I am using are Pandas and openpyxl. When I try to create the bundle I receive this error. $ RecursionError: maximum recursion depth exceeded in comparison I have tried increasing my recursion limit and most...
SGray2
1

votes
0

answer
26

Views

SetLayeredWindowAttributes error when used on Tkinter Canvas Item when compiled by PyInstaller

I am creating an overlay HUD for a game using transparent Tkinter windows. SetLayeredWindowAttributes is throwing up an error explaining 'The parameter is incorrect'. But this only happens in the compiled version of the program using PyInstaller. If I launch it from PyCharm, the code works perfectly...
user3092077
1

votes
1

answer
38

Views

How can I catch any output to the console from a Python Tkinter application?

I have a large, multifile, Tkinter app with innumerable functions, that is then being packaged with Pyinstaller as an executable. It contains error handling for expected events. However, it does not have any error handling for unexpected events. When running the application before packaging it as an...
user1318135
1

votes
1

answer
407

Views

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: # -*- mode: python -*- block_cipher = None a = Analysis(['main.p...
user5989986
1

votes
0

answer
116

Views

Pyinstaller: GUI can transfer to .exe but it show ModuleNotFoundError: No module named 'sklearn'

I use pyinstaller and let my GUI code bundle to a .exe suceessfully. But when I run the .exe, it show Exception in Tkinter callback Traceback (most recent call last): File 'tkinter\__init__.py', line 1699, in __call__ File 'EL_GUI.py', line 56, in EL_model ModuleNotFoundError: No module named 'skle...
賴嘉蔚
1

votes
0

answer
128

Views

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 mistakes when I use py2exe / cx_Freeze or just open...
Alexander Ka
1

votes
1

answer
2.8k

Views

Pyinstaller: fatal error, failed to execute script

This is a recurring theme, distributing python code seams to be a non-ending issue (I have checked all related answers I could find on SO regarding this). I have a script containing the following imports: import tkinter as tk from tkinter import * from tkinter import messagebox as mbox import panda...
Darth Vagrant
1

votes
1

answer
164

Views

Pyinstaller windowed and noconsole is not working

I'm using pyinstaller 3.3.1 and python 3.6.My problem is I cant run pyinstaller script in both no-console and windowed mode. My project is a web application built using Django 1.9. Error Log: Error: [, OSError(9, 'The handle is invalid', None, 6, None), ] Traceback (most recent call last): File 'sit...
Sanu K yadav
1

votes
0

answer
22

Views

The Inno Setup Runhidden flag is not working, how do I make it work?

I have wrapped up my django project using pyinstaller and later used Inno Setup to make installer. Since django command prompt running background looks ugly, I use the runhidden flag in Inno Setup. But when I click on desktop icon the application starts running by hiding the command prompt, and whe...
frank hk
1

votes
1

answer
370

Views

Pyinstaller produces massive folder

I'm using pyinstaller to pack a splash screen, these are the import of the python script: import subprocess import time import sys import os import signal from multiprocessing import Process, Queue import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk, Pango I use the followi...
Luca
1

votes
2

answer
1.6k

Views

Installing PyInstaller on Mac

I have not seen this issue in my google searches. I am trying to install PyInstaller on my work Mac which I do not have administrative access. $ pip install --user pyinstaller Collecting pyinstaller Requirement already satisfied: dis3 in ./Library/Python/2.7/lib/python/site-packages (from pyinstall...
jchan
1

votes
1

answer
160

Views

What is the proper way to transfer a file over a network with the shutil.copy module?

I am a novice programmer so please excuse the poor code and the simplicity of my inquiry. I am attempting to transfer an SQL database backup from one machine to another via Python. I am using Python version 3.6.4 on a Windows 7 Professional machine. The machine I'm transferring it to is a Windows...
thinheir
1

votes
0

answer
182

Views

How can I solve a PermissionError, raised when I save a file using PyInstaller in a given directory?

I have a problem in an app I created using PyInstaller. I want to create a report on excel using openpyxl, then I save it in a directory I choose using tkinter.filedialog.askdirectory() comand. Everything works perfectly when I run the code from Spyder, but when I create an .exe app using PyInstalle...
Carlos H Alonso
1

votes
0

answer
164

Views

Import opencv-python single modules

I'm trying to create a python app that uses opencv as backend, the problem arise when i try to export the application using pyinstaller, in fact, even though i use very few functions of cv2: from cv2 import normalize, cvtColor, applyColorMap, imread, NORM_MINMAX, COLORMAP_JET, COLOR_BGR2RGB everytim...
Luca
1

votes
0

answer
111

Views

Import Error : C Extension while generating windows executable of a Python script using PyInstaller

Import error: C extension: NO MODULE NAMED TIMEDELTAS NOT BUILT. If you want to import PANDAS from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first. I tried following things up to now but couldn't resolve this : pip install --upgrade p...
luckypanda
1

votes
0

answer
43

Views

How to run unit tests using pyinstaller

I am using pyinstaller to bundle my python project. I also have some unit tests in my project and I was wondering if there is a way to run the unit tests before pyinstaller bundles everything together. Is it possible? Here is my spec file # -*- mode: python -*- block_cipher = None import os import s...
AbtPst
1

votes
0

answer
652

Views

fully standalone exe from cython

I have a python script that intended to be a fully independent exe, this can be done - as far as I reached - by the following methods: 1- use something like py2exe or pyinstaller. And their problem is quite known that the output is very large compared to anything else,, not good to have tens of MBs...
Mohamed Ibrahim

View additional questions