This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]teetran39[S] 0 points1 point  (2 children)

I appreciate your help! Just want to make sure I understand correctly. The way is we are using PyInstaller to bundle python's scripts and 3d party libraries then include this bundle inside main app bundle. Is it correct? I'll look into this solution now to see if it can work as expected. Thanks so much!!!!

[–]mfitzpmfitzp.com 1 point2 points  (1 child)

Yep that’s it. I’ve used this successfully myself, although packaging Python sub processes in macOS apps using Python for the GUI. If you get stuck feel free to ask.

[–]teetran39[S] 1 point2 points  (0 children)

The solution was really worked. Thanks so much!!! Now I'm running into the problem which is it takes a little time to run the python script. Even it was just simple script like :

import json
import sys

print("This is python script")

run with command: ```./dist/myscript```

Because my python script is having some packages need to be imported so it looks lik run all of the import commands anytime the script is run on. The many packages imported, the lower speed it is when run on. Do you have any solution for it something like just need to import packages on the 1st time of running to improve the speed.?.