I am using PyQt5 and freezing the app using fbs. The app allows for users to run Python scripts. I then save the script in a Python file and run a QProcess to run that file.
The scripts that will be running are written by the user. I want to be able to run scripts that import specific libraries like NumPy without having the user install the libraries themselves.
How can I run the QProcess from the Python environment that I am freezing? So that the users don't have to install anything to run their scripts other than my app.
Right now, after freezing, the QProcess uses the default Python environment installed on the machine.
You can import user script in your app using
importlib.machinery.SourceFileLoader
user_script.py
app.py
to run in separate thread use
QThread