Installed Python 3.10 (MacOS) - now fails to install/upgrade Homeassistant

So I followed the warnings for Python3.8 needing to be upgraded and upgraded to 3.10 on Macos. It broke my HASS installation (MacOS Install Home Assistant Core installation MacOS - Home Assistant).

When I try to reinstall HASS in a new environment (after failing to upgrade, I cleaned it out and did it all over again) it fails with this:

Building wheels for collected packages: ciso8601, yarl
Building wheel for ciso8601 (pyproject.toml) … error
ERROR: Command errored out with exit status 1:
command: /Users/culture/homeassistant/bin/python3 /Users/culture/homeassistant/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/hq/qsvbvvnd4dqgrsqb28y3qw4w0000gn/T/tmphpbffsff
cwd: /private/var/folders/hq/qsvbvvnd4dqgrsqb28y3qw4w0000gn/T/pip-install-4egw15ea/ciso8601_6d72fcd19ca349a4a4c0147711b9256e
Complete output (111 lines):
[…]
ERROR: Failed building wheel for yarl
Failed to build ciso8601 yarl
ERROR: Could not build wheels for ciso8601, yarl, which is required to install pyproject.toml-based projects

Apparently it might have something to do with python3-dev according to other responses, but how do I install python3-dev on MacOS (no apt-get, homebrew is available). Brew just says there is “no available formula with the name python3-dev”.

Or is there something else that’s wrong?

Turns out this particular problem was partially solved by installing XCode. AND accepting the license agreement for XCode.

Now Home Assistant installs using pip3.

However a lot of other stuff is broken - cameras not working for som JPG library failing to install.

2021-12-25 09:46:50 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package PyTurboJPEG==1.6.3: ERROR: Command errored out with exit status 1:
command: /Users/culture/homeassistant/bin/python3 /Users/culture/homeassistant/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/hq/qsvbvvnd4dqgrsqb28y3qw4w0000gn/T/tmp9x1c5tqm
cwd: /private/var/folders/hq/qsvbvvnd4dqgrsqb28y3qw4w0000gn/T/pip-install-olztwpuk/numpy
Complete output (967 lines):
setup.py:63: RuntimeWarning: NumPy 1.21.5 may not yet support Python 3.10.
warnings.warn(

Numpy failing:

Complete output (967 lines):
setup.py:63: RuntimeWarning: NumPy 1.21.5 may not yet support Python 3.10.
warnings.warn(

ERROR: Failed building wheel for numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

Repeated errors in log:

pysnmp.carrier.error.CarrierError: Traceback (most recent call last):
; File “/Users/culture/homeassistant/lib/python3.10/site-packages/pysnmp/carrier/asyncio/dgram/base.py”, line 93, in openClientMode
self._lport = getattr(asyncio, ‘async’)(c)
;AttributeError: module ‘asyncio’ has no attribute ‘async’
caused by <class ‘AttributeError’>: module ‘asyncio’ has no attribute ‘async’

Lots of other errors.

Second restart of Home Assistant seems to have fixed everything, including cameras and Netatmo, in spite of asyncio-error repeating.