Error with the build wheel

(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.

Kynect@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.