agentscope-ai / agentscope-ai/agentscope

[Bug]:uv sync fails due to numpy version conflict between qdrant-client and py-openjudge

Open
#1,267 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
31.5k
Forks
3.5k
Avg merge
1d 23h
Merged PRs (30d)
95

Description

## Description

Running `uv sync` (or `uv pip install -e ".[dev]"`) fails with a dependency resolution error because `qdrant-client==1.15.1` and `py-openjudge` have incompatible `numpy` version requirements:

- `qdrant-client==1.15.1` requires `numpy>=2.1.0` (on Python >= 3.13)
- `py-openjudge` (all versions) requires `numpy>=1.22.0,<2.0.0`

Both packages are included transitively through the `dev` optional-dependency group:
- `dev` → `full` → `rag` → `vdbs` → `qdrant` → `qdrant-client==1.15.1`
- `dev` → `py-openjudge`

Note: `uv pip install -e .` (core dependencies only) works fine since neither package is in the core `dependencies`.

## Environment

- Python: 3.13.12
- uv: latest
- OS: macOS

## Error Message

```
$ uv sync
× No solution found when resolving dependencies for split (markers: python_full_version >= '3.14'
│ and sys_platform == 'win32'):
╰─▶ Because qdrant-client==1.15.1 depends on numpy{python_full_version >= '3.13'}>=2.1.0 and all
versions of py-openjudge depend on numpy>=1.22.0,<2.0.0, we can conclude that all versions of
py-openjudge and qdrant-client==1.15.1 are incompatible.
And because agentscope[dev] depends on py-openjudge, we can conclude that agentscope[dev] and
qdrant-client==1.15.1 are incompatible.
And because agentscope[dev] depends on qdrant-client==1.15.1 and your project requires
agentscope[dev], we can conclude that your project's requirements are unsatisfiable.
```

Even `uv sync --no-dev` fails because `uv` resolves **all** dependency groups for satisfiability, not just the ones being installed.

## Root Cause

`py-openjudge` pins `numpy<2.0.0`, but `qdrant-client>=1.13.0` requires `numpy>=2.1.0` on Python >= 3.13 (via environment marker `python_full_version >= '3.13'`). These two constraints are mutually exclusive on modern Python.

## Solution

Add `override-dependencies` in `[tool.uv]` to remove the numpy upper bound from `py-openjudge`:

```toml
[tool.uv]
# Override py-openjudge's numpy<2.0.0 constraint to resolve conflict
# with qdrant-client's numpy>=2.1.0 requirement on Python>=3.13
override-dependencies = [
"numpy>=1.22.0",
]
```

This allows `uv` to resolve `numpy>=2.1.0` for Python >= 3.13 (satisfying `qdrant-client`) while keeping `numpy>=1.22.0` as the lower bound.

### Approaches that did NOT work

| Approach | Why it failed |
|----------|--------------|
| Relaxing `qdrant-client` version range (`>=1.13.0,<1.16.0`) | All versions in this range have the same `numpy>=2.1.0` requirement for Python >= 3.13 |
| Adding `python_version < '3.13'` marker to `py-openjudge` | `uv` still resolves cross-environment satisfiability and finds the conflict |
| Limiting `requires-python` to `<3.14` | Conflict still exists for the Python 3.13 split |
| Declaring `qdrant` and `openjudge` as `[tool.uv] conflicts` | `dev` → `full` → `vdbs` → `qdrant` transitively pulls in `qdrant-client`, so the conflict declaration can't separate them |

### ⚠️ Note

`py-openjudge` may not be fully compatible with `numpy>=2.0.0` at runtime. If issues arise, consider removing `py-openjudge` from `dev` dependencies or replacing it with a numpy 2.x-compatible alternative.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.