OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

uvloop does not support Windows at the moment

Open Xerizaf opened this issue 1 year ago • 13 comments

Describe the buggit log -n 1

I'm trying to install OpenDevin truough the make build command but it exited with an error

Setup and configuration

Windows with WSL, Python 3.11.8, Docker Desktop 4.28.0 and Node.js 20.12.1

Current version:

commit 310cd7017d669c5414f29fcb79fc2b8e6e51c552 (HEAD -> main, origin/main, origin/HEAD)
Author: Robert Brennan <[email protected]>
Date:   Wed Apr 3 10:22:08 2024 -0400

    Add link to LiteLLM to make-setup (#614)

    * Update Makefile

    * fix tab

    * add note to readme

My config.toml and environment vars (be sure to redact API keys):

LLM_API_KEY="<YOUR OPENAI API KEY>"
WORKSPACE_DIR="./workspace"

My model and agent (you can see these settings in the UI):

  • Model:
  • Agent:

Commands I ran to install and run OpenDevin:

make build

Steps to Reproduce:

  1. Pulling latest Docker image
  2. Installing dependencies
  3. Building the whole project

Logs, error messages, and screenshots: 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:\Users\Maradei\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip_vendor\pyproject_hooks_ in_process_in_process.py", line 353, in main() File "C:\Users\Maradei\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip_vendor\pyproject_hooks_ in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Maradei\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip_vendor\pyproject_hooks_ in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Maradei\AppData\Local\Temp\pip-build-env-5zvknnss\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Maradei\AppData\Local\Temp\pip-build-env-5zvknnss\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires self.run_setup() File "C:\Users\Maradei\AppData\Local\Temp\pip-build-env-5zvknnss\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 8, in RuntimeError: uvloop does not support Windows at the moment

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. [pipenv.exceptions.InstallError]: error: subprocess-exited-with-error [pipenv.exceptions.InstallError]: [pipenv.exceptions.InstallError]: × Getting requirements to build wheel did not run successfully. [pipenv.exceptions.InstallError]: │ exit code: 1 [pipenv.exceptions.InstallError]: ╰─> [18 lines of output] [pipenv.exceptions.InstallError]: Traceback (most recent call last): [pipenv.exceptions.InstallError]: File "C:\Users\Maradei\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in [pipenv.exceptions.InstallError]: main() [pipenv.exceptions.InstallError]: File "C:\Users\Maradei\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main [pipenv.exceptions.InstallError]: json_out['return_val'] = hook(**hook_input['kwargs']) [pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [pipenv.exceptions.InstallError]: File "C:\Users\Maradei\AppData\Local\Programs\Python\Python311\Lib\site-packages\pipenv\patched\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel [pipenv.exceptions.InstallError]: return hook(config_settings) [pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^ [pipenv.exceptions.InstallError]: File "C:\Users\Maradei\AppData\Local\Temp\pip-build-env-5zvknnss\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel [pipenv.exceptions.InstallError]: return self._get_build_requires(config_settings, requirements=['wheel']) [pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [pipenv.exceptions.InstallError]: File "C:\Users\Maradei\AppData\Local\Temp\pip-build-env-5zvknnss\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires [pipenv.exceptions.InstallError]: self.run_setup() [pipenv.exceptions.InstallError]: File "C:\Users\Maradei\AppData\Local\Temp\pip-build-env-5zvknnss\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup [pipenv.exceptions.InstallError]: exec(code, locals()) [pipenv.exceptions.InstallError]: File "", line 8, in [pipenv.exceptions.InstallError]: RuntimeError: uvloop does not support Windows at the moment [pipenv.exceptions.InstallError]: [end of output] [pipenv.exceptions.InstallError]: [pipenv.exceptions.InstallError]: note: This error originates from a subprocess, and is likely not a problem with pip. [pipenv.exceptions.InstallError]: error: subprocess-exited-with-error [pipenv.exceptions.InstallError]: [pipenv.exceptions.InstallError]: × Getting requirements to build wheel did not run successfully. [pipenv.exceptions.InstallError]: │ exit code: 1 [pipenv.exceptions.InstallError]: ╰─> See above for output. [pipenv.exceptions.InstallError]: [pipenv.exceptions.InstallError]: note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Couldn't install package: {} Package installation failed... C:\Users\Maradei\AppData\Local\Programs\Python\Python311\Lib\subprocess.py:1127: ResourceWarning: subprocess 10212 is still running _warn("subprocess %s is still running" % self.pid, ResourceWarning: Enable tracemalloc to get the object allocation traceback sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=5 encoding='utf-8'> ResourceWarning: Enable tracemalloc to get the object allocation traceback sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=6 encoding='utf-8'> ResourceWarning: Enable tracemalloc to get the object allocation traceback make: *** [Makefile:19: build] Error 1

Additional Context

I think I properly set up my environment but I'm unable to get it to work. Maybe the devs can help me. Thank you.

Xerizaf avatar Apr 03 '24 18:04 Xerizaf

+1 I get the same error, yesterday I was able to install it normally but since today it won't anymore

BigFatherJesus avatar Apr 03 '24 18:04 BigFatherJesus

+1 get the same error. Windows with WSL, Python 3.11.0, Docker Desktop 4.28.0 and Node.js 21.7.1

Starsek avatar Apr 03 '24 19:04 Starsek

+1

kursadysr avatar Apr 03 '24 19:04 kursadysr

+1

Ahmet0691 avatar Apr 03 '24 19:04 Ahmet0691

+1

emberfish avatar Apr 03 '24 21:04 emberfish

+1

JBGitHub11 avatar Apr 03 '24 21:04 JBGitHub11

Remove the entire "uvloop" json section from Pipfile.lock file and that should resolve the unsupported error.

        "uvloop": {
            "hashes": [
                "sha256:0246f4fd1bf2bf702e06b0d45ee91677ee5c31242f39aab4ea6fe0c51aedd0fd",
		...
                "sha256:f467a5fd23b4fc43ed86342641f3936a68ded707f4627622fa3f82a120e18256"
            ],
            "version": "==0.19.0"
        },

Ideally, the Pipfile should check for windows and exclude uvloop or, as an alternative, consider winloop.

e.g.

uvloop = {version = "*", markers = "sys_platform != 'win32'"}

borawjm avatar Apr 04 '24 00:04 borawjm

borawjm's recommendation seems to help a bit. After removing uvloop from the Pipfile.lock file, setup continues but then runs into a new error:

Installing dependencies from Pipfile.lock (90ed62)... "Setting up frontend environment..." "Detect Node.js version..." Current Node.js version is 20.11.1, corepack is supported. -f was unexpected at this time. make: *** [Makefile:23: build] Error 255

Any ideas?

leonvanzyl avatar Apr 04 '24 12:04 leonvanzyl

@leonvanzyl which shell do you use? I have a similar problem when I run "make run" with powershell. When I run it in git bash, the command works. The frontend and backend start and the frontend can be called. However, when I call the frontend I get this error:

Please check Docker is running using docker ps. Error! Install pypiwin32 package to enable npipe:// support Failed to stop container: Install pypiwin32 package to enable npipe:// support Error creating controller.

and I see no indication that a container will be started after the Docker pull

Starsek avatar Apr 04 '24 12:04 Starsek

after Removing the entire "uvloop" , ihave this error : make run
"Running the app..." "Windows_NT" was unexpected at this time. make: *** [Makefile:43: run] Error 255 it appear after make run , and at the end of make build : To activate this project's virtualenv, run pipenv shell. Alternatively, run a command inside the virtualenv with pipenv run. "Setting up frontend environment..." "Detect Node.js version..." Current Node.js version is 20.11.0, corepack is supported. -f was unexpected at this time.

waello avatar Apr 04 '24 23:04 waello

@waello same quedtion to you. What shell do you use?

Starsek avatar Apr 05 '24 05:04 Starsek

@waello same quedtion to you. What shell do you use?

powershell

waello avatar Apr 05 '24 05:04 waello

Try to use a bash e.g. git bash. That worked for me :)

Starsek avatar Apr 05 '24 05:04 Starsek

We have folks up and running on WSL, so I'm going to close this one as obsolete. If folks are still struggling with uvloop errors when running on WSL, feel free to open a new issue with the template filled out.

rbren avatar Apr 09 '24 19:04 rbren