Skip to content
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

Open
Systemcluster opened this issue Aug 3, 2024 · 15 comments
Open

Comments

@Systemcluster
Copy link

Systemcluster commented Aug 3, 2024

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.

❯ 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

It seems to be using the default Python for this step even though it should be using the project Python.

❯ 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: [email protected]
virtual: false
configured sources:
  default (index: https://pypi.org/simple/)
❯ rye run python --version
Python 3.10.14

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 where self-python is 3.10, and pdm runs on the project without issues.

Extracted from #1291, please transfer this issue to the repo where it's most appropriate.

Expected Result

Done!

Actual Result

  × 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

Version Info

rye 0.38.0
commit: 0.38.0 (3e3c8540f 2024-08-02)
platform: windows (x86_64)
self-python: [email protected]
symlink support: true
uv enabled: true

Stacktrace

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: BaseThreadInitThunk
  16: RtlUserThreadStart
@Systemcluster
Copy link
Author

It seems cloning the linked repository to another location and running rye sync there works on the same system, but I cannot pinpoint why. I assume something must be different, even after deleting .venv, .python-version and the requirements files.

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?

@charliermarsh
Copy link
Member

My first guess was that you already had a .venv in the first folder, and that environment used Python 3.12.3. So Rye was trying to reuse that environment even though the Python version didn't match the requirement. But you mentioned that you removed .venv, and the behavior persisted, which would rule that out.

@Systemcluster
Copy link
Author

Systemcluster commented Aug 3, 2024

Yeah, the .venv is definitely deleted. Here's the output with deleting it as the first step.

❯ 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

@Systemcluster
Copy link
Author

Systemcluster commented Aug 3, 2024

Here's the relevant output with RUST_LOG="trace" from Installing dependencies to where it diverges.

New location:

Installing dependencies
DEBUG uv 0.2.33
DEBUG Searching for Python interpreter in system path or `py` launcher
TRACE Cached interpreter info for Python 3.10.14, skipping probing: .venv\Scripts\python.exe
DEBUG Found `cpython-3.10.14-windows-x86_64-none` at `D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager\.venv\Scripts\python.exe` (active virtual environment)
DEBUG Using Python 3.10.14 environment at .venv\Scripts\python.exe
TRACE Checking lock for `.venv`
DEBUG Acquired lock for `.venv`
DEBUG Using request timeout of 30s
⠙ Resolving dependencies...                                                                                                                         DEBUG Found PEP 621 metadata for D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager in `pyproject.toml` (the-witcher-3-mod-manager)
⠙ Resolving dependencies...                                                                                                                         DEBUG Solving with installed Python version: 3.10.14
DEBUG Adding direct dependency: charset-normalizer==3.3.2
DEBUG Adding direct dependency: colorama==0.4.6
DEBUG Adding direct dependency: fasteners==0.19
DEBUG Adding direct dependency: pyside2==5.15.2.1
DEBUG Adding direct dependency: pywin32==306
DEBUG Adding direct dependency: shiboken2==5.15.2.1
DEBUG Adding direct dependency: watchdog==4.0.1
DEBUG Adding direct dependency: the-witcher-3-mod-manager*
INFO add_decision: root @ 0a0.dev0
TRACE Fetching metadata for charset-normalizer from https://pypi.org/simple/charset-normalizer/
TRACE Fetching metadata for colorama from https://pypi.org/simple/colorama/
DEBUG Searching for a compatible version of the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-mm-test/the-witcher-3-mod-manager (*)
TRACE Fetching metadata for fasteners from https://pypi.org/simple/fasteners/
TRACE Fetching metadata for pyside2 from https://pypi.org/simple/pyside2/
TRACE Fetching metadata for pywin32 from https://pypi.org/simple/pywin32/
TRACE Fetching metadata for shiboken2 from https://pypi.org/simple/shiboken2/
TRACE Fetching metadata for watchdog from https://pypi.org/simple/watchdog/
TRACE cached request https://pypi.org/simple/colorama/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/colorama/
TRACE Received package metadata for: colorama
TRACE cached request https://pypi.org/simple/fasteners/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/fasteners/
TRACE Received package metadata for: fasteners
TRACE cached request https://pypi.org/simple/pywin32/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/pywin32/
TRACE Received package metadata for: pywin32
TRACE cached request https://pypi.org/simple/pyside2/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/pyside2/
TRACE Checking lock for `\\?\C:\Users\Chris\AppData\Local\uv\cache\built-wheels-v3\editable\c798c827ff8176b2`
DEBUG Acquired lock for `\\?\C:\Users\Chris\AppData\Local\uv\cache\built-wheels-v3\editable\c798c827ff8176b2`
TRACE Received package metadata for: pyside2
TRACE cached request https://pypi.org/simple/charset-normalizer/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/charset-normalizer/
TRACE Received package metadata for: charset-normalizer
TRACE cached request https://pypi.org/simple/shiboken2/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/shiboken2/
TRACE Received package metadata for: shiboken2
TRACE cached request https://pypi.org/simple/watchdog/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/watchdog/
TRACE Received package metadata for: watchdog
DEBUG Using cached metadata for: the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-mm-test/the-witcher-3-mod-manager
DEBUG No workspace root found, using project root
TRACE Received source distribution metadata for: the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-mm-test/the-witcher-3-mod-manager
⠙ the-witcher-3-mod-manager==0.9.2rc0                                                                                                               INFO add_decision: the-witcher-3-mod-manager @ 0.9.2rc0

Old location with error:

Installing dependencies
DEBUG uv 0.2.33
DEBUG Searching for Python interpreter in system path or `py` launcher
TRACE Cached interpreter info for Python 3.12.3, skipping probing: .venv\Scripts\python.exe
DEBUG Found `cpython-3.12.3-windows-x86_64-none` at `D:\Development\the-witcher-3-mod-manager\.venv\Scripts\python.exe` (active virtual environment)
DEBUG Using Python 3.12.3 environment at .venv\Scripts\python.exe
TRACE Checking lock for `.venv`
DEBUG Acquired lock for `.venv`
DEBUG Using request timeout of 30s
⠙ Resolving dependencies...                                                                                                                         DEBUG Found PEP 621 metadata for D:\Development\the-witcher-3-mod-manager in `pyproject.toml` (the-witcher-3-mod-manager)
⠙ Resolving dependencies...                                                                                                                         DEBUG Solving with installed Python version: 3.12.3
DEBUG Adding direct dependency: charset-normalizer==3.3.2
DEBUG Adding direct dependency: colorama==0.4.6
DEBUG Adding direct dependency: fasteners==0.19
DEBUG Adding direct dependency: pyside2==5.15.2.1
DEBUG Adding direct dependency: pywin32==306
DEBUG Adding direct dependency: shiboken2==5.15.2.1
DEBUG Adding direct dependency: watchdog==4.0.1
DEBUG Adding direct dependency: the-witcher-3-mod-manager*
INFO add_decision: root @ 0a0.dev0
TRACE Fetching metadata for charset-normalizer from https://pypi.org/simple/charset-normalizer/
DEBUG Searching for a compatible version of the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-3-mod-manager (*)
TRACE Fetching metadata for colorama from https://pypi.org/simple/colorama/
TRACE Fetching metadata for fasteners from https://pypi.org/simple/fasteners/
TRACE Fetching metadata for pyside2 from https://pypi.org/simple/pyside2/
TRACE Fetching metadata for pywin32 from https://pypi.org/simple/pywin32/
TRACE Fetching metadata for shiboken2 from https://pypi.org/simple/shiboken2/
TRACE Fetching metadata for watchdog from https://pypi.org/simple/watchdog/
TRACE cached request https://pypi.org/simple/colorama/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/colorama/
TRACE Received package metadata for: colorama
TRACE cached request https://pypi.org/simple/fasteners/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/fasteners/
TRACE Received package metadata for: fasteners
TRACE cached request https://pypi.org/simple/pywin32/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/pywin32/
TRACE Checking lock for `\\?\C:\Users\Chris\AppData\Local\uv\cache\built-wheels-v3\editable\67b2a1188c8c9744`
TRACE Received package metadata for: pywin32
DEBUG Acquired lock for `\\?\C:\Users\Chris\AppData\Local\uv\cache\built-wheels-v3\editable\67b2a1188c8c9744`
TRACE cached request https://pypi.org/simple/pyside2/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/pyside2/
TRACE Received package metadata for: pyside2
TRACE cached request https://pypi.org/simple/shiboken2/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/shiboken2/
TRACE Received package metadata for: shiboken2
TRACE cached request https://pypi.org/simple/charset-normalizer/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/charset-normalizer/
TRACE Received package metadata for: charset-normalizer
TRACE cached request https://pypi.org/simple/watchdog/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/watchdog/
TRACE Received package metadata for: watchdog
DEBUG Using cached metadata for: the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-3-mod-manager
DEBUG No workspace root found, using project root
TRACE Received source distribution metadata for: the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-3-mod-manager
DEBUG No compatible version found for: Python
INFO Start conflict resolution because incompat satisfied:
   Python >=3.10, <3.11 is forbidden
INFO prior cause: the-witcher-3-mod-manager ==0.9.2rc0 is forbidden
INFO backtrack to DecisionLevel(1)
DEBUG Searching for a compatible version of the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-3-mod-manager (<0.9.2rc0 | >0.9.2rc0)
DEBUG No compatible version found for: the-witcher-3-mod-manager
INFO Start conflict resolution because incompat satisfied:
   the-witcher-3-mod-manager <0.9.2rc0 | >0.9.2rc0 is forbidden
INFO prior cause: the-witcher-3-mod-manager * is forbidden
INFO prior cause: root ==0a0.dev0 is forbidden
  × 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

Looking at those logs it's obvious the issue is with ~\AppData\Local\uv\cache. It's picking the cached Python 3.12.3 immediately without considering the project restraints.

Workaround: Removing the cache directory makes rye sync work.

(Is there a subcommand for clearing the cache? I couldn't find one without spending too much time looking.)

I won't upload the cache directory here as it's over 2GB, but I can upload a subset if necessary.

@Systemcluster
Copy link
Author

Systemcluster commented Aug 3, 2024

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 rye-py-ver.

mkdir rye-py-ver

Create a pyproject.toml with a requires-python of >=3.12.

[project]
name = "rye-py-ver"
description = "Error repro for Rye"
version = "0.1"
requires-python = ">=3.12"

Now run rye sync to create the .venv.
Then delete the .venv and any other file that rye created so just the pyproject.toml is left again.

Next edit the pyproject.toml and set requires-python to >=3.10,<3.11.

[project]
#...
requires-python = ">=3.10,<3.11"

Now run rye sync again. It will fail with the error reported here.

❯ 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.

@charliermarsh
Copy link
Member

Thanks, that's helpful! I'll give it a try when I have a free moment.

@charliermarsh
Copy link
Member

charliermarsh commented Aug 3, 2024

Ugh, bad news -- this actually didn't fail for me. On the second sync, I got:

❯ rye sync
Initializing new virtualenv in /Users/crmarsh/workspace/puffin/rye-py-ver/.venv
Python version: [email protected]
Generating production lockfile: /Users/crmarsh/workspace/puffin/rye-py-ver/requirements.lock
Generating dev lockfile: /Users/crmarsh/workspace/puffin/rye-py-ver/requirements-dev.lock
Installing dependencies
Resolved 1 package in 0.66ms
   Built rye-py-ver @ file:///Users/crmarsh/workspace/puffin/rye-py-ver
Prepared 1 package in 963ms
Installed 1 package in 0.79ms
 + rye-py-ver==0.1 (from file:///Users/crmarsh/workspace/puffin/rye-py-ver)
Done!
❯ rye --version
rye 0.38.0
commit: 0.38.0 (3e3c8540f 2024-08-02)
platform: macos (aarch64)
self-python: [email protected]
symlink support: true
uv enabled: true

@Systemcluster
Copy link
Author

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.

@charliermarsh
Copy link
Member

Ah ok. Yes I can try it on Windows but not today (don't have my Windows machine with me).

@taehokim97
Copy link

I am also experiencing the same issue as described in this issue.

image

OS: Windows11
platform: win-amd64

Even after changing the project version from >=3.12,<3.13 to >=3.11,<3.12 and completely removing and reinstalling the .venv, the current project is still recognized as version 3.12.4.

@charliermarsh
Copy link
Member

I'll try to test it out today now that I'm back home.

@thanksshu
Copy link

I'm also experiencing this issue on the Windows platform, is there any follow up on this now?

> rye --version
rye 0.39.0
commit: 0.39.0 (bf3ccf818 2024-08-21)
platform: windows (x86_64)
self-python: [email protected]
symlink support: true
uv enabled: true
> rye sync
Initializing new virtualenv in D:\project\.venv
Python version: [email protected]
Generating production lockfile: D:\project\requirements.lock
Generating dev lockfile: D:\project\requirements-dev.lock
Installing dependencies
  × No solution found when resolving dependencies:
  ╰─▶ Because the current Python version (3.12.5) does not satisfy Python>=3.8,<3.9 and project==0.1.0 depends on Python>=3.8,<3.9, we can conclude      
      that project==0.1.0 cannot be used.
      And because only project==0.1.0 is available and you require pcbrogocreator, we can conclude that your requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\project\.venv. uv exited with status: exit code: 1
> rye show     
project: project
path: D:\project
venv: D:\project\.venv
target python: 3.8
venv python: [email protected]
virtual: false
configured sources:
  default (index: https://pypi.org/simple/)

@ivinayaks
Copy link

+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.

@sche34
Copy link

sche34 commented Sep 23, 2024

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.

@majidaldo
Copy link

works when i specify requires-python="<3.{one less (minor ver)}".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants