rye add pytorch
This fails because the package is called "torch" -- there is an error message informing the user of this fact.
rye add torch
This fails due to the same error! Again there is an error message informing the user that the package is called torch.
The issue is that after step #1, pytorch is added to pyproject.toml and thereafter rye add will fail.
Expected Result
rye add pytorch should inform the user to install torch, and then rye add torch would succeed.
I am not sure what is a general solution to this problem --- but I think pytorch is a common enough use-case that it deserves special treatment even if a general solution is not applicable.
Actual Result
$ rye add pytorch
Added pytorch>=1.0.2 as regular dependency
Reusing already existing virtualenv
Generating production lockfile: .../requirements.lock
Generating dev lockfile: .../requirements-dev.lock
Installing dependencies
Resolved 2 packages in 1ms
Built ... @ file://...
error: Failed to prepare distributions
Caused by: Failed to fetch wheel: pytorch==1.0.2
Caused by: Failed to build: `pytorch==1.0.2`
Caused by: Build backend failed to build wheel through `build_wheel()` with exit status: 1
--- stdout:
--- stderr:
Traceback (most recent call last):
File "<string>", line 11, in <module>
File "/Users/.../Library/Caches/uv/builds-v0/.tmpkGJsSr/lib/python3.12/site-packages/setuptools/build_meta.py", line 415, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../Library/Caches/uv/builds-v0/.tmpkGJsSr/lib/python3.12/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
self.run_setup()
File "/Users/.../Library/Caches/uv/builds-v0/.tmpkGJsSr/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/Users/.../Library/Caches/uv/builds-v0/.tmpkGJsSr/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 15, in <module>
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
---
error: Installation of dependencies failed in venv at .../.venv. uv exited with status: exit status: 2
$ rye add torch
Added torch>=2.3.1 as regular dependency
Reusing already existing virtualenv
Generating production lockfile: .../requirements.lock
Generating dev lockfile: .../requirements-dev.lock
Installing dependencies
Resolved 11 packages in 3ms
Built ... @ file://...
error: Failed to prepare distributions
Caused by: Failed to fetch wheel: pytorch==1.0.2
Caused by: Failed to build: `pytorch==1.0.2`
Caused by: Build backend failed to build wheel through `build_wheel()` with exit status: 1
--- stdout:
--- stderr:
Traceback (most recent call last):
File "<string>", line 11, in <module>
File "/Users/.../Library/Caches/uv/builds-v0/.tmpdmzLiI/lib/python3.12/site-packages/setuptools/build_meta.py", line 415, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../Library/Caches/uv/builds-v0/.tmpdmzLiI/lib/python3.12/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
self.run_setup()
File "/Users/.../Library/Caches/uv/builds-v0/.tmpdmzLiI/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/Users/.../Library/Caches/uv/builds-v0/.tmpdmzLiI/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 15, in <module>
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
---
error: Installation of dependencies failed in venv at .../.venv. uv exited with status: exit status: 2
Steps to Reproduce
rye add pytorch
This fails because the package is called "torch" -- there is an error message informing the user of this fact.rye add torch
This fails due to the same error! Again there is an error message informing the user that the package is calledtorch
.The issue is that after step #1,
pytorch
is added topyproject.toml
and thereafterrye add
will fail.Expected Result
rye add pytorch
should inform the user to installtorch
, and thenrye add torch
would succeed.I am not sure what is a general solution to this problem --- but I think
pytorch
is a common enough use-case that it deserves special treatment even if a general solution is not applicable.Actual Result
Version Info
Stacktrace
No response