pytorch - 💡(How to fix) Fix I cannot build PyTorch on Linux [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#180392Fetched 2026-04-16 06:34:54
View on GitHub
Comments
3
Participants
3
Timeline
81
Reactions
0
Timeline (top)
mentioned ×36subscribed ×36labeled ×5commented ×3

Error Message

[2629/5804] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/SortingKernel.cpp.SVE256.cpp.o ninja: build stopped: subcommand failed. error: subprocess-exited-with-error

× Building editable for torch (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> No available output.

note: This error originates from a subprocess, and is likely not a problem with pip. full command: /home/yeonguchoebusiness/pytorch/.venv/bin/python /home/yeonguchoebusiness/pytorch/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_editable /tmp/tmp4okde_bo cwd: /home/yeonguchoebusiness/pytorch Building editable for torch (pyproject.toml) ... error ERROR: Failed building editable for torch Failed to build torch error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects ╰─> torch

Code Example

git submodule sync
git submodule update --init --recursive

python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
pip install --group dev

export USE_CUDA=0
export USE_ROCM=0
export USE_XPU=0
export CMAKE_PREFIX_PATH="${VIRTUAL_ENV}:${CMAKE_PREFIX_PATH}"
python -m pip install --no-build-isolation -v -e .

---

[2629/5804] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/SortingKernel.cpp.SVE256.cpp.o
  ninja: build stopped: subcommand failed.
  error: subprocess-exited-with-error
  
  × Building editable for torch (pyproject.toml) did not run successfully.
   exit code: 1
  ╰─> No available output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/yeonguchoebusiness/pytorch/.venv/bin/python /home/yeonguchoebusiness/pytorch/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_editable /tmp/tmp4okde_bo
  cwd: /home/yeonguchoebusiness/pytorch
  Building editable for torch (pyproject.toml) ... error
  ERROR: Failed building editable for torch
Failed to build torch
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> torch

---

git pull https://github.com/pytorch/pytorch.git
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

Hello

I tried to build PyTorch from source in the git. I followed the installation process in README.md.

The following is the steps I took.

git submodule sync
git submodule update --init --recursive

python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
pip install --group dev

export USE_CUDA=0
export USE_ROCM=0
export USE_XPU=0
export CMAKE_PREFIX_PATH="${VIRTUAL_ENV}:${CMAKE_PREFIX_PATH}"
python -m pip install --no-build-isolation -v -e .

But then, I get the following error and the build process stops.

[2629/5804] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/SortingKernel.cpp.SVE256.cpp.o
  ninja: build stopped: subcommand failed.
  error: subprocess-exited-with-error
  
  × Building editable for torch (pyproject.toml) did not run successfully.
exit code: 1
  ╰─> No available output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/yeonguchoebusiness/pytorch/.venv/bin/python /home/yeonguchoebusiness/pytorch/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_editable /tmp/tmp4okde_bo
  cwd: /home/yeonguchoebusiness/pytorch
  Building editable for torch (pyproject.toml) ... error
  ERROR: Failed building editable for torch
Failed to build torch
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> torch

My environment is x86 CPU and Linux Ubuntu distro.

I am planning to contribute to the compiler of the project.

Thanks.

Sincerely, Yeongu

Versions

I cloned the main branch of the PyTorch repository.

git pull https://github.com/pytorch/pytorch.git

cc @malfet @seemethere @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168 @aditew01 @snadampal @milpuz01 @nikhil-arm @fadara01 @robert-hardwick @nWEIdia

extent analysis

TL;DR

  • The most likely fix is to investigate and resolve the compilation error in the PyTorch build process, potentially related to the C++ compilation of SortingKernel.cpp.SVE256.cpp.o.

Guidance

  • Verify that the build environment meets all the requirements specified in the PyTorch README.md, including the necessary dependencies and compiler versions.
  • Check the C++ compiler version and ensure it is compatible with the PyTorch build process, as the error occurs during the compilation of a C++ object.
  • Investigate the specific error message subcommand failed and the compilation of SortingKernel.cpp.SVE256.cpp.o to identify the root cause of the issue.
  • Consider checking the PyTorch repository's issues or discussion forums for similar build errors on x86 CPU and Linux Ubuntu distro.

Example

  • No specific code snippet can be provided without further information on the compilation error.

Notes

  • The error message suggests that the issue is related to the build process of PyTorch, but the exact cause is unclear without more detailed output or logs.
  • The fact that the build process stops during the compilation of a C++ object suggests a potential issue with the C++ compiler or the code being compiled.

Recommendation

  • Apply workaround: Investigate and resolve the compilation error, potentially by updating the C++ compiler or modifying the build process to skip the problematic object file, as the issue is likely specific to the build environment or the PyTorch code.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - 💡(How to fix) Fix I cannot build PyTorch on Linux [3 comments, 3 participants]