astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.6k stars 466 forks source link

Impossible dependency resolution error when the conflicting package is explicitly "rye add"ed. #1364

Open Benjamin4JLT opened 3 weeks ago

Benjamin4JLT commented 3 weeks ago

Steps to Reproduce

I started on a fresh Mac OS 14 instance. I followed these (https://mac.install.guide/python/install-rye) instructions to install rye and python and to set path. Then I followed these (https://mac.install.guide/python/use-rye) instructions and ran the following commands:

$ rye pin 3

$ rye init

$ rye add pinecone-client

$ rye add pinecone-datasets

$ rye sync

Expected Result

I only added two packages from the same source... I expected Rye to either 1) resolve that it needed to install pinecone-client==3.2.2 or 2) suggest "add"ing this package with that version specified.

Perhaps my expectation is naive. As I am new to Rye, it was jarring to have such an "impossible" error on my first sync, with only two packages.

Actual Result

On running "rye sync," I immediately got "impossible resolution" errors.

"....pip._internal.exceptions.DistributionNotFound: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts error: could not write production lockfile for project"

I did some digging and found that "pinecone-datasets" had "pinecone-client" as a dependency, and that "pinecone-datasets" wanted "pinecone-client==3.2.2", while the most recent version of pinecone-client is 5.0.1. Rye did not resolve that it should install 3.2.2.

Version Info

rye 0.39.0 commit: 0.39.0 (bf3ccf818 2024-08-21) platform: macos (aarch64) self-python: cpython@3.12.5 symlink support: true uv enabled: false

Stacktrace

No response