-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
Can't specify per-dependency package index / can't specify uv behavior in config file #1210
Comments
Since pytorch needs to grab from their server and not pypi, we need to add that source. However, since the pytorch source has an older version of requests (~2.28), and rye is using uv, it grabs the pytorch version of requests and gives up looking for a satisfactory version, without checking the pypi repo. As described here. The promise of rye/uv seems heaven-sent, and is worth the switch. But... falling back to rye/pip-tools for compatibility isn't appealing enough to make rye worth the switch from my existing workflow (mamba/conda). So, implementing dependency-specific packages in rye would be great! |
We could expose uv’s index strategy argument in Rye, which would let you opt-in to a strategy that works here. Would that work? |
That would work! Separate note, I see it's suggested here that uv hopes to swallow rye's higher-level functionality, eventually, so I guess these sorts of bugs/features are maybe a temporary bandaid until that happens? Looking forward to it. |
That would be great @charliermarsh ! |
Having this would be great. I stumbled upon this issue when I tried to install an internal package. We have two internal indexes, and one package (in prod index) depends on another internal package (on dev index). |
We are having the same problem here. We want to install [[tool.rye.sources]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cpu" makes some conflicts on versions on another packages dependencies, as pytorch server is outdated. Setting But implementing dependency-specific packages is something we were using in pipenv. The hard thing is to find a way to define this and being PEP 508 compliant. |
We plan to support that kind of "index pinning" in uv eventually (though you're right that it can't be expressed purely in PEP 508 terms). |
I believe this is the correct |
Steps to Reproduce
rye init
rye add pytorch
(optional to reproduce, but necessary for my project)rye add requests>=2.30.0
Expected Result
A successful install of the desired requests version, while also being able to install pytorch.
Actual Result
× No solution found when resolving dependencies:
╰─▶ Because only requests<2.30.0 is available and you require requests>=2.30.0, we can
conclude that the requirements are unsatisfiable.
Version Info
rye 0.36.0
commit: 0.36.0 (12c024c 2024-07-07)
platform: linux (x86_64)
self-python: cpython@3.12.3
symlink support: true
uv enabled: true
Stacktrace
Stack backtrace:
0: anyhow::error::::msg
1: rye::lock::generate_lockfile
2: rye::lock::update_single_project_lockfile
3: rye::sync::sync
4: rye::cli::sync::execute
5: rye::cli::execute
6: std::panicking::try
7: rye::utils::panic::trap_bad_pipe
8: rye::main
9: std::sys_common::backtrace::__rust_begin_short_backtrace
10: std::rt::lang_start::{{closure}}
11: std::rt::lang_start_internal
12: main
The text was updated successfully, but these errors were encountered: