-
-
Notifications
You must be signed in to change notification settings - Fork 474
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
Rye refuses installation of projects requiring a lower Python version #1309
Comments
It seems cloning the linked repository to another location and running Original project: ❯ pwd
Path
----
D:\Development\the-witcher-3-mod-manager
❯ git status
On branch rye
Your branch is up to date with 'origin/rye'.
❯ rye show
project: The-Witcher-3-Mod-Manager
path: D:\Development\the-witcher-3-mod-manager
venv: D:\Development\the-witcher-3-mod-manager\.venv
target python: 3.10
venv python: cpython@3.10.14
virtual: false
configured sources:
default (index: https://pypi.org/simple/)
❯ rye --version
rye 0.38.0
commit: 0.38.0 (3e3c8540f 2024-08-02)
platform: windows (x86_64)
self-python: cpython@3.12.3
symlink support: true
uv enabled: true
❯ bat .\.venv\pyvenv.cfg
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: .\.venv\pyvenv.cfg
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ home = C:\Users\Chris\AppData\Local\rye\py\cpython@3.10.14
2 │ implementation = CPython
3 │ uv = 0.2.33
4 │ version_info = 3.10.14
5 │ include-system-site-packages = false
6 │ relocatable = false
7 │ prompt = The-Witcher-3-Mod-Manager
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ bat .\.venv\rye-venv.json
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: .\.venv\rye-venv.json
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ {
2 │ "python": "[email protected]",
3 │ "venv_path": "D:\\Development\\the-witcher-3-mod-manager\\.venv"
4 │ }
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ rye sync
Reusing already existing virtualenv
Generating production lockfile: D:\Development\the-witcher-3-mod-manager\requirements.lock
Generating dev lockfile: D:\Development\the-witcher-3-mod-manager\requirements-dev.lock
Installing dependencies
× No solution found when resolving dependencies:
╰─▶ Because the current Python version (3.12.3) does not satisfy Python>=3.10,<3.11 and the-witcher-3-mod-manager==0.9.2rc0 depends on
Python>=3.10,<3.11, we can conclude that the-witcher-3-mod-manager==0.9.2rc0 cannot be used.
And because only the-witcher-3-mod-manager==0.9.2rc0 is available and you require the-witcher-3-mod-manager, we can conclude that the
requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\Development\the-witcher-3-mod-manager\.venv. uv exited with status: exit code: 1 Second location: ❯ pwd
Path
----
D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager
❯ git status
On branch rye
Your branch is up to date with 'origin/rye'.
❯ rye show
project: The-Witcher-3-Mod-Manager
path: D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager
venv: D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager\.venv
target python: 3.10
venv python: cpython@3.10.14
virtual: false
configured sources:
default (index: https://pypi.org/simple/)
❯ rye --version
rye 0.38.0
commit: 0.38.0 (3e3c8540f 2024-08-02)
platform: windows (x86_64)
self-python: cpython@3.12.3
symlink support: true
uv enabled: true
❯ bat .\.venv\pyvenv.cfg
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: .\.venv\pyvenv.cfg
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ home = C:\Users\Chris\AppData\Local\rye\py\cpython@3.10.14
2 │ implementation = CPython
3 │ uv = 0.2.33
4 │ version_info = 3.10.14
5 │ include-system-site-packages = false
6 │ relocatable = false
7 │ prompt = The-Witcher-3-Mod-Manager
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ bat .\.venv\rye-venv.json
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: .\.venv\rye-venv.json
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ {
2 │ "python": "[email protected]",
3 │ "venv_path": "D:\\Development\\the-witcher-mm-test\\the-witcher-3-mod-manager\\.venv"
4 │ }
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ rye sync
Reusing already existing virtualenv
Generating production lockfile: D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager\requirements.lock
Generating dev lockfile: D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager\requirements-dev.lock
Installing dependencies
Resolved 26 packages in 8ms
Audited 26 packages in 0.12ms
Done! Is there other state stored somewhere that could influence this? |
My first guess was that you already had a |
Yeah, the ❯ rm -r -Force .\.venv\
❯ rm .\requirements*
❯ lls
.editorconfig
.git
.gitignore
.pylintrc
.vscode
build
LICENSE
main.py
pyproject.toml
Readme.md
res
setup_.py
src
tools
translations
ts.pro
ts.py
❯ pwd
Path
----
D:\Development\the-witcher-3-mod-manager
❯ rye sync
Initializing new virtualenv in D:\Development\the-witcher-3-mod-manager\.venv
Python version: cpython@3.10.14
Generating production lockfile: D:\Development\the-witcher-3-mod-manager\requirements.lock
Generating dev lockfile: D:\Development\the-witcher-3-mod-manager\requirements-dev.lock
Installing dependencies
× No solution found when resolving dependencies:
╰─▶ Because the current Python version (3.12.3) does not satisfy Python>=3.10,<3.11 and the-witcher-3-mod-manager==0.9.2rc0 depends on
Python>=3.10,<3.11, we can conclude that the-witcher-3-mod-manager==0.9.2rc0 cannot be used.
And because only the-witcher-3-mod-manager==0.9.2rc0 is available and you require the-witcher-3-mod-manager, we can conclude that the
requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\Development\the-witcher-3-mod-manager\.venv. uv exited with status: exit code: 1 |
Here's the relevant output with New location:
Old location with error:
Looking at those logs it's obvious the issue is with Workaround: Removing the cache directory makes (Is there a subcommand for clearing the cache? I couldn't find one without spending too much time looking.) I won't upload the |
I found an easy way to reproduce this issue. The general configuration of my installation can be seen in the above comments where relevant. Create a new directory, here I'll use mkdir rye-py-ver Create a [project]
name = "rye-py-ver"
description = "Error repro for Rye"
version = "0.1"
requires-python = ">=3.12" Now run Next edit the [project]
#...
requires-python = ">=3.10,<3.11" Now run ❯ rye sync
Initializing new virtualenv in D:\Development\rye-py-ver\.venv
Python version: [email protected]
Generating production lockfile: D:\Development\rye-py-ver\requirements.lock
Generating dev lockfile: D:\Development\rye-py-ver\requirements-dev.lock
Installing dependencies
× No solution found when resolving dependencies:
╰─▶ Because the current Python version (3.12.3) does not satisfy Python>=3.10,<3.11 and rye-py-ver==0.1 depends on Python>=3.10,<3.11, we can
conclude that rye-py-ver==0.1 cannot be used.
And because only rye-py-ver==0.1 is available and you require rye-py-ver, we can conclude that the requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\Development\rye-py-ver\.venv. uv exited with status: exit code: 1 @charliermarsh I think the issue should be easy to locate with this info. |
Thanks, that's helpful! I'll give it a try when I have a free moment. |
Ugh, bad news -- this actually didn't fail for me. On the second sync, I got:
|
Can you try it on Windows? I also can't reproduce it with Linux, but on Windows it reproduces every time. I can try on macOS later as well, but I assume the issue is Windows only. |
Ah ok. Yes I can try it on Windows but not today (don't have my Windows machine with me). |
I'll try to test it out today now that I'm back home. |
I'm also experiencing this issue on the Windows platform, is there any follow up on this now?
|
+1. Similar issues faced on Windows. Tried pinning a lower version repeatedly and deleting and resyncing the venv. 'rye show' shows the version I pinned (3.11.9) but when I sync and install a dependency I get the same error as described above. |
I ran into the same problem where I specified to use python 3.11.9 in the pyproject.toml and .python-version, but it kept using the 3.12.5 toolchain. Oddly, the issue was solved when I used requires-python = "~=3.11" in the pyproject.toml and specify the specific version (3.11.9) in the .python-version file. |
works when i specify |
Steps to Reproduce
In a project that requires a lower Python version than the system Python (or
self-python
),rye sync
will fail with unsatisfiable requirements.It seems to be using the default Python for this step even though it should be using the project Python.
Reproducible with
this project. It's an older project and that branch is experimental, it will fail to build, but it should still succeed to sync.these steps.I don't have this issue with
rye
on a Linux system whereself-python
is3.10
, andpdm
runs on the project without issues.Extracted from #1291, please transfer this issue to the repo where it's most appropriate.
Expected Result
Actual Result
Version Info
Stacktrace
The text was updated successfully, but these errors were encountered: