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

[Bug]: Build error on opencv-python #6063

Closed
1 task done
neubig opened this issue Jan 6, 2025 · 3 comments · Fixed by #6064
Closed
1 task done

[Bug]: Build error on opencv-python #6063

neubig opened this issue Jan 6, 2025 · 3 comments · Fixed by #6064
Assignees
Labels
bug Something isn't working fix-me Attempt to fix this issue with OpenHands

Comments

@neubig
Copy link
Contributor

neubig commented Jan 6, 2025

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

We have a build error related to opencv-python on my mac.

$ make build
Building project...
Checking dependencies...
Checking system...
macOS detected.
Checking Python installation...
Python 3.12.8 is already installed.
Checking npm installation...
npm 10.9.0 is already installed.
Checking Node.js installation...
Node.js 23.3.0 is already installed.
Checking Docker installation...
Docker version 27.4.0, build bde2b89 is already installed.
Checking Poetry installation...
Poetry (version 1.8.4) is already installed.
Dependencies checked successfully.
Installing Python dependencies...
Defaulting TZ (timezone) to UTC
Using virtualenv: /Users/gneubig/Library/Caches/pypoetry/virtualenvs/openhands-ai-mHbwbJq6-py3.12
Installing chroma-hnswlib...
Requirement already satisfied: chroma-hnswlib in /Users/gneubig/Library/Caches/pypoetry/virtualenvs/openhands-ai-mHbwbJq6-py3.12/lib/python3.12/site-packages (0.7.6)
Requirement already satisfied: numpy in /Users/gneubig/Library/Caches/pypoetry/virtualenvs/openhands-ai-mHbwbJq6-py3.12/lib/python3.12/site-packages (from chroma-hnswlib) (2.2.1)
Installing dependencies from lock file

Package operations: 1 install, 0 updates, 0 removals

  - Installing opencv-python (4.10.0.84): Failed

  ChefBuildError

  Backend 'setuptools.build_meta:__legacy__' is not available.
  
  Cannot import 'setuptools.build_meta'

  at ~/Library/Application Support/pypoetry/venv/lib/python3.13/site-packages/poetry/installation/chef.py:164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with opencv-python (4.10.0.84) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "opencv-python (==4.10.0.84)"'.

make[1]: *** [install-python-dependencies] Error 1
make: *** [build] Error 2

I'm actually not sure if we need opencv-python at all in our repo, so I think it might be worth attempting to remove this dependency and run INSTALL_DOCKER=0 make build to see if the project still builds. If it does, we can just remove the dependency. Otherwise, we will need to take some other course of action, such as pinning opencv-python to a working version.

OpenHands Installation

Development workflow

OpenHands Version

main

Operating System

MacOS

Logs, Errors, Screenshots, and Additional Context

No response

@neubig neubig added bug Something isn't working fix-me Attempt to fix this issue with OpenHands labels Jan 6, 2025
@openhands-agent
Copy link
Contributor

OpenHands started fixing the issue! You can monitor the progress here.

@openhands-agent
Copy link
Contributor

A potential fix has been generated and a draft PR #6064 has been created. Please review the changes.

@mamoodi
Copy link
Collaborator

mamoodi commented Jan 6, 2025

Duplicate of #6045.

Was this fixed though? I don't see it on my Mac. Wondering if there is a specific environment thing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix-me Attempt to fix this issue with OpenHands
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants