Answer the question
In order to leave comments, you need to log in
How can I build a working exe file using Pyinstaller if I use third-party libraries?
All good!
I'm trying to compile my scripts to exe.
In scripts I use third-party libraries (flask and pyserial). The project itself consists of two files: the first is a large class (api manager) and the second is the one that needs to be launched, in which I import the first script + flask. The project structure is as follows:
-project
-api.py
-to_run.py
Answer the question
In order to leave comments, you need to log in
You have not added to the api.py executable here is the PyInstaller PyQt5
link
how to add a ui file?
you will understand everything there)
if, of course, the question is relevant
First, add "main.py" at the end of the line. And you, most likely, did not add some files required by the script. Then you will have a default spec file. In his Analysis section, add other scripts after main.py, and in datas in brackets ('File_name', 'folder_where_this_file'). For example, for me it was datas=[('data/Settings.txt', 'data'), ('data/CossacksPlayers.json', 'data'), ('images/LogoLOP.png', 'images'), ('LOfP.ico', '.')]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question