I am trying to install the python module spidev on a clean install. I have tried two ways:
root@PiGi:~# apt install python3-spidev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-spidev : Depends: python3 (< 3.10) but 3.11.2-1 is to be installed
E: Unable to correct problems, you have held broken packages.
root@PiGi:~# pip install spidev
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/
Collecting spidev
Downloading spidev-3.6.tar.gz (11 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: spidev
Building wheel for spidev (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for spidev (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
/tmp/pip-build-env-9b8q41f0/overlay/local/lib/python3.11/dist-packages/setuptools/dist.py:744: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'description-file' will not be supported in future
versions. Please use the underscore name 'description_file' instead.
By 2023-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
running bdist_wheel
running build
running build_ext
building 'spidev' extension
creating build
creating build/temp.linux-armv6l-cpython-311
arm-linux-gnueabihf-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.11 -c spidev_module.c -o build/temp.linux-armv6l-cpython-311/spidev_module.o
error: command 'arm-linux-gnueabihf-gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for spidev
Any suggestions?