I have a pyqt5 project which has a button. This button when clicks installs a windows service by using below command:
os.system('python myservice.py install')
os.system('python myservice.py start')
After this, a windows service myservice is installed and started. This is just one of the feature of whole application. I have now converted the project into app.exe using pyinstaller. Then using inno compiler, I have created a setup file.
I am installing the application on another system on which python is not installed. pyinstaller while converting the python scripts to exe, also binds the current python interpreter and installed packages so running the application on another pc works perfectly fine. But when I clicking on the install service buttons, its not working because it runs the command as python myservice.py install and because python is not installed thus it gives error.
I also checked this by typing python on cmd and it didnt showed anything. Is there any possibility where I can run python command without installing python on another pc. Thanks
globalsorlocals. I wouldn't normally recommend usingexecbut it does work. See this question: stackoverflow.com/questions/60253999/…python myscript.py install. I can do thisexec(open('opc_client_service.pyc').read())but I am unable to understand how do I passinstallto it.