Open kubotty opened 1 month ago
When I deleted the project directory (the parent directory of .venv
) and then recreated a directory with the same name in the same location, I was able to reproduce the issue as follows:
> rye init
> rye pin 3.10
> rye add numpy
> rye run python
>>> import numpy
It seems that the initially downloaded wheel file is cached with the path, causing it to be used regardless of the Python version.
Furthermore, I noticed that the issue also occurs when starting with Python 3.11 and then changing to Python 3.12.
This issue seems to be related to https://github.com/astral-sh/rye/issues/1400
Steps to Reproduce
After installing numpy, if you change the Python version, rye continues to install the wrong version of numpy.
To initialize a project, follow the steps below:
Rye still installs the wrong numpy version:
If you force a sync with
rye sync -f
, or even if you delete the.venv
directory and sync again withrye sync
, it still installs the wrong version.Expected Result
I expect the correct version of numpy to be installed.
If the order is changed between
rye pin
andrye add numpy
, I could get expected behavior:Actual Result
You can confirm that the wrong version is installed by checking the following directory:
Although the Python version is 3.10, the numpy distribution for Python 3.12 is mistakenly installed.
Version Info
rye 0.41.0 commit: 0.41.0 (10d691d16 2024-09-29) platform: windows (x86_64) self-python: cpython@3.12.3 symlink support: false uv enabled: true
Stacktrace
No response