Python 3.5 amd64 and win32service

Nagy László Zsolt gandalf at shopzeus.com
Fri Oct 7 02:37:33 EDT 2016


>> "C:\Users\Laci\AppData\Local\Programs\Python\Python35\lib\site-packages\win32\PythonService.exe"
> I wanted you to run the above executable, not python.exe. If it fails
> you'll get more information about why it's failing when run directly
> then when the service controller runs it. Since you're using a
> per-user installation of Python 3.5, possibly it can't find
> python35.dll.
This is something I cannot understand. This is what happens when I start
it from the command line, as a normal user:

C:\>"C:\Users\Laci\AppData\Local\Programs\Python\Python35\lib\site-packages\win32\PythonService.exe"
-debug TestService
Debugging service TestService - press Ctrl+C to stop.
Info 0x40001002 - The TestService service has started.


*Meanwhile, the service manager shows that the service is not started*.

Then I press Ctrl+C several times and I see this:

C:\>"C:\Users\Laci\AppData\Local\Programs\Python\Python35\lib\site-packages\win32\PythonService.exe"
-debug TestService
Debugging service TestService - press Ctrl+C to stop.
Info 0x40001002 - The TestService service has started.
Stopping debug service.
Stopping debug service.
Stopping debug service.
Stopping debug service.
Stopping debug service.

But the process is not closed. I had to terminate pythonservice.exe from
task manager. Next thing I tried is to start it as an administrator:
there is no difference. On the console it says that it has been started,
but in service manager it appears to be stopped.

I got no messages about missing DLL files at all.

The very same MWE works perfectly on a new virtual machine with Python
3.5.2 amd64 + pypiwin32.

Any idea what could be wrong?








More information about the Python-list mailing list