-
Notifications
You must be signed in to change notification settings - Fork 790
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
Incorrect dependency version constraints, maybe due to wrong python verison #9283
Comments
I presume this is related to the lack of wheels with a compatible Python version? https://inspector.pypi.io/project/gensim/3.8.3/ Can you share verbose logs with |
Sure. Looks like it's resolving to a metadata for py 2.7 and macos x86 while I was on arm uv pip install gensim==3.8.3 numpy==1.22.0 --no-binary gensim -v
DEBUG uv 0.5.2 (195f4b634 2024-11-14)
DEBUG Searching for default Python interpreter in virtual environments
DEBUG Found `cpython-3.10.15-macos-aarch64-none` at `/Users/caibin.chen/tmp/.venv/bin/python3` (active virtual environment)
Using Python 3.10.15 environment at /Users/caibin.chen/tmp/.venv
DEBUG Acquired lock for `/Users/caibin.chen/tmp/.venv`
DEBUG At least one requirement is not satisfied: numpy==1.22.0
DEBUG Using request timeout of 30s
DEBUG Solving with installed Python version: 3.10.15
DEBUG Solving with target Python version: >=3.10.15
DEBUG Adding direct dependency: gensim>=3.8.3, <3.8.3+
DEBUG Adding direct dependency: numpy>=1.22.0, <1.22.0+
DEBUG Found stale response for: https://pypi.org/simple/gensim/
DEBUG Sending revalidation request for: https://pypi.org/simple/gensim/
DEBUG Found stale response for: https://pypi.org/simple/numpy/
DEBUG Sending revalidation request for: https://pypi.org/simple/numpy/
DEBUG Found not-modified response for: https://pypi.org/simple/numpy/
DEBUG Found not-modified response for: https://pypi.org/simple/gensim/
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/0b/d8/98f051eb7b4c7b8837be3f062a2decb1e99467296603128211851f20c3b5/numpy-1.22.0-cp310-cp310-macosx_11_0_arm64.whl.metadata
DEBUG Searching for a compatible version of gensim (>=3.8.3, <3.8.3+)
DEBUG Selecting: gensim==3.8.3 [compatible] (gensim-3.8.3.tar.gz)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/e5/1c/eeea5353730937ab38259e057e5c99507bb7cf8ad96d29f8a947ea5e66a7/gensim-3.8.3-cp27-cp27m-macosx_10_9_x86_64.whl.metadata
DEBUG Adding transitive dependency for gensim==3.8.3: numpy<=1.16.1+
DEBUG Adding transitive dependency for gensim==3.8.3: scipy<=1.2.3+
DEBUG Adding transitive dependency for gensim==3.8.3: six>=1.5.0
DEBUG Adding transitive dependency for gensim==3.8.3: smart-open>=1.8.1, <1.11
DEBUG Searching for a compatible version of gensim (>3.8.3, <3.8.3+)
DEBUG No compatible version found for: gensim
DEBUG Found stale response for: https://pypi.org/simple/six/
DEBUG Sending revalidation request for: https://pypi.org/simple/six/
DEBUG Found stale response for: https://pypi.org/simple/smart-open/
DEBUG Sending revalidation request for: https://pypi.org/simple/smart-open/
DEBUG Found stale response for: https://pypi.org/simple/scipy/
DEBUG Sending revalidation request for: https://pypi.org/simple/scipy/
DEBUG Found not-modified response for: https://pypi.org/simple/six/
DEBUG Found not-modified response for: https://pypi.org/simple/scipy/
DEBUG Found not-modified response for: https://pypi.org/simple/smart-open/
× No solution found when resolving dependencies:
╰─▶ Because gensim==3.8.3 depends on numpy<=1.16.1 and you require gensim==3.8.3, we can conclude that you require numpy<=1.16.1.
And because you require numpy==1.22.0, we can conclude that your requirements are unsatisfiable.
DEBUG Released lock at `/Users/<...>/tmp/.venv/.lock` |
I know what the problem is here (none of the wheels are compatible, but we're fetching the "least compatible" Python implementation due to the issue in #7553). I'd note though that this is at least in part a gensim problem: they publish inconsistent metadata across the wheels, which will generally cause problems for uv (and Poetry, and possibly other tools). The wheel that we fetched does indeed say |
We read metadata from one of the wheels and assume it's consistent with the other ones — this makes resolution far more tractable. We're considering improving the behavior around this #7381, but there are trade-offs. I did think we ignored py27 wheels regardless though, cc @charliermarsh |
Oh sorry this refreshed to show Charlie's comment after I replied. What he said is more correct :) |
gensim 3.8.3 should only require numpy>=1.11.3 on Python 3.x. However uv is using the 2.x constraints (numpy <= 1.16.1)
The text was updated successfully, but these errors were encountered: