Open yahman72 opened 3 years ago
I get ModuleNotFoundError: No module named 'locale'
Is this also related to this one?
I also have this error and I tried to solve it with following code but failed:
pip install Locales
I reinstalled supervisord from github and then I was able to install it as a Windows Service
python -m pip install git+https://github.com/alexsilva/supervisor@windows -U
python -m supervisor.services install -c C:\python\supervisord\supervisord.conf
Still, Windows Service was crashing because I didn't replace %(ENV_TMP) from config file. After it was fixed Service was allowed to start and web interface opens
Environment
When running
python -m supervisor.services
(remove
orinstall
)ModuleNotFoundError
errors are raised, e.g.NOTE: To me it looks like that the problems are caused by the pywin32 package (i.e. pywin32 bugs or how pywin32 is used in supervisor-win). --> this issue might end up as "WONTFOX" but I'll document my findings here anyway for the others who might have the same problem.
There are several scenarios where this happens
Scenario-1: virtualenv & supervisor-win as depency to "develop" install
Steps to reprocude: 0) create and activate a python virtualenv 1) in new python package ("my_package") define supervisor-win as dependency i.e.
2) install that "my_package" in "develop" mode (i.e.
python setup.py develop
) i.e. after thispip list
shows my package3) run
python -m supervisor.services remove
--> FAIL(possible) problem, dependencies are installed as eggs = do not work
Workaround: Install supervisor-win and pywin32 manually i.e. run
Now the command works:
... and the difference is how the packages are installed i.e. not eggs
For comparison: If I install that "my_package" from a wheel to anothter virtualenv then it works out of the box. i.e.
pip list
shows my package now like thisagain the command works:
... and the packages here are also not eggs
Scenario-2: no virtualenv & supervisor-win as depency to wheel install
Steps to reprocude: 0) in global python env (no virtualenv) 1) in new python package ("my_package") define supervisor-win as dependency i.e.
2) create a wheel for "my_package" (i.e.
python setup.py bdist_wheel
) 3) install that that wheel with pip (i.e.pip install path\to\my_package.whl
) i.e. after thispip list
shows my package3) run
python -m supervisor.services remove
--> FAILThis time the egg-distributions cannot be the problem:
Workaround: The workaround from #12 helps here also: add
PYTHONBINPATH
toPYTHONPATH
env variable i.e.However this is quite ugly workaround, that might cause issues elsewhere because that changes the default search order i.e. without
PYTHONPATH
with
PYTHONPATH=%PYTHONBINPATH%