-
Hello, I am building an app using PyQt5. And I am using QProcess to run python scripts that are written by the user. I don't want the users to have install python or any libraries that they are using. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
Not unless you have a python environment installed on the target system. If you wanted to (re)use the embedded python interpreter that PyInstaller uses to run your frozen script, you would need to spawn the process (with QProcess) using |
Beta Was this translation helpful? Give feedback.
-
Hi, I also encountered a similar problem, I am using MacOS, I freeze QProcess into a unix executable file After I finished the main program freeze, the .app file was generated. I double-clicked to execute the .app file and the
Double-click execution and terminal execution show the same path: This is my freeze command:
@rokm Hope to get your help, thank you very much. |
Beta Was this translation helpful? Give feedback.
Not unless you have a python environment installed on the target system.
If you wanted to (re)use the embedded python interpreter that PyInstaller uses to run your frozen script, you would need to spawn the process (with QProcess) using
sys.executable
, and design your entry-point script to handle special command-line argument that signals that you want it to run the script from given file instead of the main frozen application (for example, implement optional--run-script file.py
argument). Then load the provided file and execute the code usingexec
. Of course, all modules that could be used by such e…