Open Inasayang opened 2 weeks ago
Where is "cpython@3.11.9", which evidently doesn't exist any more after uninstalling Rye, referenced in the files of your project? Do you want to download cpython@3.11.9 as a "toolchain" or upgrade the project to the already available cpython@3.12.5 of the new Rye installation?
upgrade the project to the already available cpython@3.12.5 of the new Rye installation. How to do this?
I would try the following:
rye pin 3.12
rye sync -f
Using -f on sync will delete the old .venv instead of trying to use it, so it needs to reinstall everything.
When I execute rye sync -f
, the following error occurs:
❯ rye sync -f
error: failed to delete existing virtualenv (at 'C:\Users\inasa\Desktop\pyproject\.venv')
Caused by:
Access is denied. (os error 5)
Running the cmd with administrator privileges also results in the same error.
But when I manually delete the .venv
and then execute rye sync -f
, it works.
When I open it again, it doesn't work.
pyproject on main [?] is 📦 v0.1.0 via 🐍 v3.12.5 (pyproject)
❯ rye pin 3.12
pinned 3.12.5 in C:\Users\inasa\Desktop\pyproject\.python-version
pyproject on main [?] is 📦 v0.1.0 via 🐍 v3.12.5 (pyproject)
❯ rye sync -f
Initializing new virtualenv in C:\Users\inasa\Desktop\pyproject\.venv
Python version: cpython@3.12.5
Generating production lockfile: C:\Users\inasa\Desktop\pyproject\requirements.lock
Generating dev lockfile: C:\Users\inasa\Desktop\pyproject\requirements-dev.lock
Installing dependencies
Resolved 14 packages in 13ms
error: Failed to prepare distributions
Caused by: Failed to fetch wheel: pyproject @ file:///C:/Users/inasa/Desktop/pyproject
Caused by: Failed to create temporary virtualenv
Caused by: Could not find a suitable Python executable for the virtual environment based on the interpreter: C:\Users\inasa\.rye\py\cpython@3.11.9\python.exe
error: Installation of dependencies failed in venv at C:\Users\inasa\Desktop\pyproject\.venv. uv exited with status: exit code: 2
Do you have any .python-version or .python-versions files in this directory or any above? Look everywhere :)
I also met the same issue, here's the log
Caused by: Failed to create temporary virtualenv
Caused by: Could not find a suitable Python executable for the virtual environment based on the interpreter: C:\Users\Administrator\.rye\py\cpython@3.12.3\python.exe
the temporary solution is rye fetch 3.12.3
. I wonder why my rye requires 3.12.3 to operate everything?
the environment variables
RYE_HOME=D:\rye\bin
RYE_TOOLCHAIN=D:\rye\toolchain
Always look in the C:\Users\inasa\.rye
directory.
Steps to Reproduce
I uninstalled rye and reinstalled it in a different location. When I open the previous project again and run
rye sync
, it gives an error.But
rye show
can output the information correctly.But there are no issues with newly created projects.
I tried to delete
.venv
and then runrye sync
, but there was still no change.Expected Result
Actual Result
Version Info
Stacktrace
No response