I have a situation where i have to run a python.exe as a service in NSSM. To test, I have created .exe file which has only import pandas as pd in it. I created the service in NSSM successfully. But when I start the service I get error windows could not start the service on local computer the service did not return an error.
What else can I do to tackle this problem?
Trust me I have tried all solutions in stack overflow.
- I closed cmd when starting service.
- Gave all control to network service
Install Python in Program Files or another public folder if not already.
If your service are running as the NETWORK SERVICE run CMD with psexec as the NETWORK SERVICE:
Install pandas with this cmd.
In cmd check if you can run python and import pandas.
Since services can't have windows you need to somehow check result of your program. For example redirect exception to a file: