Install crewai failed on Windows, due to :RuntimeError: uvloop does not support Windows at the moment

python version:
Python 3.10.7

install cmd:

pip install 'crewai[tools]'

error msg:

Collecting uvloop<0.22.0,>=0.21.0 (from litellm>=1.44.22->crewai[tools])
  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
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "D:\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
          ~~~~^^
        File "D:\Python313\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:\Python313\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 "D:\Temp\pip-build-env-fmvl54nd\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 "D:\Temp\pip-build-env-fmvl54nd\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "D:\Temp\pip-build-env-fmvl54nd\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 8, in <module>

      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.2 -> 24.3.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.
1 Like

Seems its happening because of latest version of litellm(needs uvloop-0.21.0. which does not support windows) I manually installed litellm==1.57.4 and was able to install crewai.

3 Likes

Thanks for the solution.

Go to CMD
wsl --install
and then run
pip install 'crewai[tools]'
To access this in VSC go to the terminal and execute
wsl

I’m running LiteLLM version 1.57.4 but I’m still getting the uvloop error message when i attempt “crewai install”. Any thoughts on how to fix this? Thanks.

C:\Users\dujua\Projects\latest_ai_development>crewai install
C:\Users\dujua\AppData\Roaming\Python\Python312\site-packages\pydantic_internal_config.py:345: UserWarning: Valid config keys have changed in V2:

  • ‘fields’ has been removed
    warnings.warn(message, UserWarning)
    Resolved 238 packages in 123ms
    x Failed to build uvloop==0.21.0
    |-> The build backend returned an error
    -> Call to setuptools.build_meta.build_wheel` failed (exit code: 1)

    [stderr]
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "C:\Users\dujua\AppData\Local\uv\cache\builds-v0\.tmpZGoUVv\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\dujua\AppData\Local\uv\cache\builds-v0\.tmpZGoUVv\Lib\site-packages\setuptools\build_meta.py",
    line 304, in _get_build_requires
        self.run_setup()
      File "C:\Users\dujua\AppData\Local\uv\cache\builds-v0\.tmpZGoUVv\Lib\site-packages\setuptools\build_meta.py",
    line 320, in run_setup
        exec(code, locals())
      File "<string>", line 8, in <module>
    RuntimeError: uvloop does not support Windows at the moment
    
    hint: This usually indicates a problem with the package or the build environment.
    

    help: uvloop (v0.21.0) was included because latest-ai-development (v0.1.0) depends on crewai (v0.95.0) which
    depends on litellm (v1.57.5) which depends on uvloop
    An error occurred while running the crew: Command ‘[‘uv’, ‘sync’]’ returned non-zero exit status 1.

C:\Users\dujua\Projects\latest_ai_development>litellm --version
C:\Users\dujua\AppData\Roaming\Python\Python312\site-packages\pydantic_internal_config.py:345: UserWarning: Valid config keys have changed in V2:

  • ‘fields’ has been removed
    warnings.warn(message, UserWarning)

LiteLLM: Current Version = 1.57.4

C:\Users\dujua\Projects\latest_ai_development>

Have you activated venv?
another way you can try is adding dependency in .toml file

dependencies = [
“litellm==1.57.4”
]

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.