Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'uvloop' #1066

Closed
555chy opened this issue Feb 18, 2025 · 3 comments
Closed

ModuleNotFoundError: No module named 'uvloop' #1066

555chy opened this issue Feb 18, 2025 · 3 comments

Comments

@555chy
Copy link

555chy commented Feb 18, 2025

PS D:\Downloads\WrenAI-main-2.7\wren-ai-service> poetry lock
Skipping virtualenv creation, as specified in config file.
Resolving dependencies... (3.9s)

PS D:\Downloads\WrenAI-main-2.7\wren-ai-service> poetry install
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file
No dependencies to install or update

PS D:\Downloads\WrenAI-main-2.7\wren-ai-service> poetry run python -m src.main
Skipping virtualenv creation, as specified in config file.
Warning: Configuration file config.yaml not found. Using default settings.
WARNING: Current configuration will not reload as not all conditions are met, please refer to documentation.
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "D:\Downloads\WrenAI-main-2.7\wren-ai-service\src_main
.py", line 91, in
uvicorn.run(
File "D:\software\Python\Lib\site-packages\uvicorn\main.py", line 577, in run
server.run()
File "D:\software\Python\Lib\site-packages\uvicorn\server.py", line 64, in run
self.config.setup_event_loop()
File "D:\software\Python\Lib\site-packages\uvicorn\config.py", line 475, in setup_event_loop
loop_setup: Callable | None = import_from_string(LOOP_SETUPS[self.loop])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\Python\Lib\site-packages\uvicorn\importer.py", line 22, in import_from_string
raise exc from None
File "D:\software\Python\Lib\site-packages\uvicorn\importer.py", line 19, in import_from_string
module = importlib.import_module(module_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\software\Python\Lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\software\Python\Lib\site-packages\uvicorn\loops\uvloop.py", line 3, in
import uvloop
ModuleNotFoundError: No module named 'uvloop'

@goldmedal
Copy link
Contributor

Thanks for reporting, @555chy
It's a Wren AI issue (AI service). I saw you have raised an issue for it (Canner/WrenAI#1315). Let's close this here.

@555chy
Copy link
Author

555chy commented Feb 19, 2025

PS D:\Downloads\WrenAI-main-2.7\wren-ai-service> pip install uvloop
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting uvloop
Using cached https://mirrors.aliyun.com/pypi/packages/af/c0/854216d09d33c543f12a44b393c402e89a920b1a0a7dc634c42de91b9cf6/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 "D:\software\Python\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "D:\software\Python\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 "D:\software\Python\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\Administrator\AppData\Local\Temp\pip-build-env-ec1c9419\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-ec1c9419\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-ec1c9419\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, 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.

[notice] A new release of pip is available: 24.3.1 -> 25.0.1
[notice] To update, run: python.exe -m pip install --upgrade 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.


我找到问题了,是uvloop不支持在window上运行
I found the problem, it's that uvloop doesn't support running on window

@goldmedal
Copy link
Contributor

我找到问题了,是uvloop不支持在window上运行 I found the problem, it's that uvloop doesn't support running on window

Thanks for investigating this, @555chy
I think we are better to mention this in the Wren AI doc. c.c. @cyyeh @wwwy3y3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants