You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install rye with the default values curl -sSf https://rye.astral.sh/get | bash
Welcome to Rye!
This installer will install rye to /home/tomas/.rye
This path can be changed by exporting the RYE_HOME environment variable.
Details:
Rye Version: 0.36.0
Platform: linux (x86_64)
✔ Continue? · yes
✔ Select the preferred package installer · uv (fast, recommended)
✔ What should running `python` or `python3`do when you are not inside a Rye managed project? · Run a Python installed and managed by Rye
✔ Which version of Python should be used as default toolchain? · [email protected]
Installed binary to /home/tomas/.rye/shims/rye
Bootstrapping rye internals
Fetching requested internal toolchain '[email protected]'
Downloading [email protected]
Checking checksum
Unpacking
Downloaded [email protected]
Updated self-python installation at /home/tomas/.rye/self
The rye directory /home/tomas/.rye/shims was not detected on PATH.
It is highly recommended that you add it.
✔ Should the installer add Rye to PATH via .profile? · yes
Added to PATH.
Create a folder for a project mkdir -p myproject/python && cd myproject/python
rye init --script
rye sync
Run rye add -d ruff or any other package. Or any other command where rye uses python.
Expected Result
Some sort of error or at least warning when running rye init --script inside a folder named python.
At first it wasn't obvious to me that Rye would end up using my package named python to execute commands internally and simply break without any error or warning, specially because at no point I executed explicitly any command to install my python in my system nor told rye to use that version.
This isn't a problem when simply running rye init inside a folder named python.
If you are wondering why I'm running rye init --script inside a folder named python, that is because I was creating a repository with a problem solved in different programming languages and one of them was python.
Maybe add an error when trying to execute inside a folder named python and a flag like -i or --ignore to ignore errors in case someone really knows what they are doing and wants to install their python anyway.
Actual Result
[~/myproject/python] $ rye add -d ruff
error: Failed to run uv compile DEBUG uv 0.2.22
DEBUG Starting Python discovery for Python 3.12.3
DEBUG Looking for exact match for request Python 3.12.3
DEBUG Searching forPython 3.12.3in system path
DEBUG Failed to query Python interpreter at `/home/tomas/myproject/python/.venv/bin/python3`
error: Failed to query Python interpreter at `/home/tomas/myproject/python/.venv/bin/python3`
Caused by: Too many levels of symbolic links (os error 40)
. uv exited with status: exit status: 2
Even on other projects it will stop working unless I reinstall rye
[~/myproject] $ mkdir -p foobar &&cd foobar
[~/myproject/foobar] $ rye init
success: Initialized project in /home/tomas/myproject/foobar/.
Run `rye sync` to get started
[~/myproject/foobar]$ rye sync
Initializing new virtualenv in /home/tomas/myproject/foobar/.venv
Python version: [email protected]
DEBUG uv 0.2.22
DEBUG Checking for Python interpreter at path `/home/tomas/.rye/py/[email protected]/bin/python3`
× Failed to query Python interpreter at `/home/tomas/.rye/py/[email protected]/bin/python3`
╰─▶ Too many levels of symbolic links (os error 40)
error: failed creating virtualenv ahead of sync
Caused by:
0: failed to initialize virtualenv
1: Failed to create self venv using /home/tomas/.rye/py/[email protected]/bin/python3. uv exited with status: exit status: 1
Project python and rye's self-python need to be the same version (I think).
The rye sync command wants to install the script python. It follows the existing symlink which goes to Rye's python install, and overwrites the file ~/.rye/py/[email protected]/bin/python3.12 (!) with a python script snippet.
Steps to Reproduce
curl -sSf https://rye.astral.sh/get | bash
mkdir -p myproject/python && cd myproject/python
rye init --script
rye sync
rye add -d ruff
or any other package. Or any other command where rye uses python.Expected Result
Some sort of error or at least warning when running
rye init --script
inside a folder namedpython
.At first it wasn't obvious to me that Rye would end up using my package named python to execute commands internally and simply break without any error or warning, specially because at no point I executed explicitly any command to install my python in my system nor told rye to use that version.
This isn't a problem when simply running
rye init
inside a folder namedpython
.If you are wondering why I'm running
rye init --script
inside a folder namedpython
, that is because I was creating a repository with a problem solved in different programming languages and one of them was python.Maybe add an error when trying to execute inside a folder named
python
and a flag like-i
or--ignore
to ignore errors in case someone really knows what they are doing and wants to install theirpython
anyway.Actual Result
Even on other projects it will stop working unless I reinstall rye
Version Info
Stacktrace
No response
The text was updated successfully, but these errors were encountered: