New weatherhat, no love

I have a brand new weatherhat with age-old problems: a failed install. I’m trying to install the weatherhat package on a Raspberry Pi 3 Model B Plus Rev 1.3 running Debian GNU/Linux 11 (bullseye) and get the error message below. I’ve updated all of the packages, manually updated pip3, and have tried to manually install each of the libraries. I get the same error message from either running the install.sh script or by running pip3 install st7789. I’ve tried both tcsh and bash.

Thanks for any help!

Building wheels for collected packages: spidev
Building wheel for spidev (PEP 517) … error
ERROR: Command errored out with exit status 1:
command: /home/pi/.virtualenvs/pimoroni/bin/python3 /tmp/tmpvs7pqayg_in_process.py build_wheel /tmp/tmpwh35nznb
cwd: /tmp/pip-install-7ydupqgk/spidev_5882b35adf844176a5129c4bb4c28f55
Complete output (56 lines):
running bdist_wheel
running build
running build_ext
creating build
creating build/temp.linux-aarch64-3.9
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/reproducible-path/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/pi/.virtualenvs/pimoroni/include -I/usr/include/python3.9 -c spidev_module.c -o build/temp.linux-aarch64-3.9/spidev_module.o
creating build/lib.linux-aarch64-3.9
aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 build/temp.linux-aarch64-3.9/spidev_module.o -L/usr/lib -o build/lib.linux-aarch64-3.9/spidev.cpython-39-aarch64-linux-gnu.so
running install
running install_lib
Traceback (most recent call last):
File “/tmp/tmpvs7pqayg_in_process.py”, line 280, in
main()
File “/tmp/tmpvs7pqayg_in_process.py”, line 263, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File “/tmp/tmpvs7pqayg_in_process.py”, line 204, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File “/usr/lib/python3/dist-packages/setuptools/build_meta.py”, line 216, in build_wheel
return self._build_with_temp_dir([‘bdist_wheel’], ‘.whl’,
File “/usr/lib/python3/dist-packages/setuptools/build_meta.py”, line 202, in _build_with_temp_dir
self.run_setup()
File “/usr/lib/python3/dist-packages/setuptools/build_meta.py”, line 145, in run_setup
exec(compile(code, file, ‘exec’), locals())
File “setup.py”, line 26, in
setup( name = “spidev”,
File “/usr/lib/python3/dist-packages/setuptools/init.py”, line 153, in setup
return distutils.core.setup(**attrs)
File “/usr/lib/python3/dist-packages/setuptools/_distutils/core.py”, line 148, in setup
dist.run_commands()
File “/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py”, line 967, in run_commands
self.run_command(cmd)
File “/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py”, line 986, in run_command
cmd_obj.run()
File “/usr/lib/python3/dist-packages/wheel/bdist_wheel.py”, line 259, in run
self.run_command(‘install’)
File “/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py”, line 986, in run_command
cmd_obj.run()
File “/usr/lib/python3/dist-packages/setuptools/command/install.py”, line 61, in run
return orig.install.run(self)
File “/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py”, line 578, in run
self.run_command(cmd_name)
File “/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py”, line 985, in run_command
cmd_obj.ensure_finalized()
File “/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py”, line 107, in ensure_finalized
self.finalize_options()
File “/usr/lib/python3/dist-packages/setuptools/command/install_lib.py”, line 17, in finalize_options
self.set_undefined_options(‘install’,(‘install_layout’,‘install_layout’))
File “/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py”, line 290, in set_undefined_options
setattr(self, dst_option, getattr(src_cmd_obj, src_option))
File “/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py”, line 103, in getattr
raise AttributeError(attr)
AttributeError: install_layout

ERROR: Failed building wheel for spidev

Problem solved: I upgraded the system to bookworm and everything worked as suggested.

Gotta say, it’s frustrating that the system requirements for the library are not mentioned anywhere…