elastic/python-elastic-agent-client

uvloop==0.21.0 is not compatible to Windows

mjoshii opened this issue · 1 comments

I am running the makefile to setup the connector so I can run elasticsearch locally but I get a "RuntimeError: uvloop does not support Windows at the moment".

The alternative windows solution is winloop. It's causing setup issues for me. Can someone please fix it so it works for Windows machine as well?

The makefile calls the requirements/agent.txt which points to "elastic-agent-client@git+https://github.com/elastic/python-elastic-agent-client@main".

This repo has the requirements.txt which needs "uvloop==0.21.0" (row 4).

The error I get while running the makefile locally is given below:

Collecting uvloop<1,>=0.20 (from elastic-agent-client@ git+https://github.com/elastic/python-elastic-agent-client@main->-r requirements/agent.txt (line 1))
Using cached uvloop-0.21.0.tar.gz (2.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
Traceback (most recent call last):
File "C:\ProgramData\elasticsearch_connector\connectors.venv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\ProgramData\elasticsearch_connector\connectors.venv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\elasticsearch_connector\connectors.venv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mjosh\AppData\Local\Temp\pip-build-env-p4046ihm\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mjosh\AppData\Local\Temp\pip-build-env-p4046ihm\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
self.run_setup()
File "C:\Users\mjosh\AppData\Local\Temp\pip-build-env-p4046ihm\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
exec(code, locals())
File "", line 8, in
RuntimeError: uvloop does not support Windows at the moment
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
make: *** [Makefile:31: .venv/Scripts/elastic-ingest] Error 1

Hi @mjoshii,

This issue seems to be related to https://github.com/elastic/connectors repository. The issue is not only in uvloop - it's possible to run connectors without it. Additionally to that, Windows does not handle signals in same way Unix does, so that would not work too. Connectors are not officially compatible with Windows and we recommend running it in any Unix system.