# Error with the build wheel

**URL:** <https://discuss.pytorch.org/t/error-with-the-build-wheel/203478>\
**Category:** Uncategorized\
**Created:** [May 26, 2024, 8:01am UTC](https://discuss.pytorch.org/t/error-with-the-build-wheel/203478 "2024-05-26T08:01:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raf789](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/raf789/32/70250_2.png) [@raf789](https://discuss.pytorch.org/u/raf789)\
**Post date:** [May 26, 2024, 8:01am UTC](https://discuss.pytorch.org/t/error-with-the-build-wheel/203478/1 "2024-05-26T08:01:05Z")

</div>

(raf© kali-raspberry-pi-zero-2-w)-[~] pip install pytorch

Defaulting to user installation because normal site-packages is not writeable Collecting pytorch Using cached pytorch-1.0.2. tar.gz (689 bytes) Preparing metadata (setup.py) … done Building wheels for collected packages: pytorch Building wheel for pytorch (setup.py) … error error: subprocess-exited-with-error python setup.py bdist wheel did not rull successfully. exit code: 1 \> [6 lines of output] Traceback (most recent call last): File “‹string\>”, line 2, in ‹module\> File “‹pip-setuptools-caller\>”, line 34, in ‹module\> File “/tmp/pip-install-lhoczi82/pytorch\_573a1798d654826a953d5c2bbd7c f96/setup-py”, line 15, in ‹module\> raise Exception(message) Exception: You tried to install “pytorch”. The package named for PyTorch is “torch” [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pytorch Running setup.py clean for pytorch Failed to build pytorch ERROR: Could not build wheels for pytorch, which is required to install pyproject.toml-based projects

I have no clue what this means but gitcloned one of the Pytorch repositories but then deleted it after it didn’t work. Then I tried this after I couldn’t find any nightly builds that worked with my pi zero 2 W.

---

<div class="post-metadata">

**Author:** ![brandon698sherrick](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@brandon698sherrick](https://discuss.pytorch.org/u/brandon698sherrick)\
**Post date:** [May 27, 2024, 4:06am UTC](https://discuss.pytorch.org/t/error-with-the-build-wheel/203478/2 "2024-05-27T04:06:22Z")

</div>

[Kynect](https://www-kynect.com)@raf789 ,

The error you’re encountering is due to trying to install a package named `pytorch` instead of the correct package name, which is `torch`. Here’s how you can correctly install PyTorch on your Raspberry Pi Zero 2 W.  
Use the correct package name torch instead of pytorch. Additionally, since you’re on a Raspberry Pi, you might need to install a version that’s compatible with your device’s architecture.  
Installing PyTorch on a Raspberry Pi can be a bit tricky due to compatibility issues. There are pre-built wheels available for ARM architectures that you can try. First, ensure you have all the necessary dependencies installed. Download the appropriate wheel file for your Raspberry Pi Zero 2 W from the PyTorch ARM build repository.

Pre-built wheels can simplify the installation process. You can also check sites like piwheels for PyTorch wheels tailored for Raspberry Pi devices.

If pre-built wheels are not available or do not work, you can try building PyTorch from source. This is a more advanced and time-consuming process. Detailed instructions can be found in the official PyTorch documentation.
