uv: Using `uv pip install` to install pytorch from its source code fails, while `pip install` works.
Summary
I am trying to build and install pytorch from its source code. When using uv pip install ., I got a error message:
[stdout]
Building wheel torch-2.6.0a0+git1eba9b3
-- Building version torch-2.6.0a0+git1eba9b3
cmake --build . --target install --config Release
[stderr]
no such file or directory
CMake Error: Generator: execution of make failed. Make command was:
/home/xxx/.cache/uv/builds-v0/.tmpG1dhel/bin/ninja install
However, if I use pip install . instead, the installation succeed without errors.
Steps to reproduce:
git clone git@github.com:pytorch/pytorch.git
cd pytorch
git checkout v2.6.0
git submodule update --init --recursive
uv venv --python 3.9
BUILD_BINARY=0 USE_PRECOMPILED_HEADERS=1 BUILD_TEST=0 USE_CUDA=0 uv pip install .
Expected result:
torch should be installed correctly.
Actual result:
The error message is posted above.
Platform
Linux
Version
uv 0.5.21
Python version
3.9.21
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (10 by maintainers)
I believe I ran with
--platform linux/amd64.