Problem with installation of HomeAssistant 2021.3 with python 3.9

(homeassistant) homeassistant@raspberrypi:/home/pi $ pip3 install --upgrade homeassistant
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting homeassistant
Using cached homeassistant-2021.3.2-py3-none-any.whl (11.2 MB)
Requirement already satisfied, skipping upgrade: voluptuous==0.12.1 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (0.12.1)
Requirement already satisfied, skipping upgrade: pyyaml==5.4.1 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (5.4.1)
Requirement already satisfied, skipping upgrade: voluptuous-serialize==2.4.0 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (2.4.0)
Requirement already satisfied, skipping upgrade: pytz>=2021.1 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (2021.1)
Requirement already satisfied, skipping upgrade: ciso8601==2.1.3 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (2.1.3)
Requirement already satisfied, skipping upgrade: yarl==1.6.3 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (1.6.3)
Requirement already satisfied, skipping upgrade: python-slugify==4.0.1 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (4.0.1)
Requirement already satisfied, skipping upgrade: jinja2>=2.11.3 in /srv/homeassistant/lib/python3.9/site-packages (from homeassistant) (2.11.3)
Collecting cryptography==3.3.2
Using cached cryptography-3.3.2.tar.gz (539 kB)
Installing build dependencies … error
ERROR: Command errored out with exit status 1:
command: /srv/homeassistant/bin/python3.9 /srv/homeassistant/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-sarxwwsy/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple – ‘setuptools>=40.6.0’ wheel ‘cffi>=1.12; platform_python_implementation != ‘"’"‘PyPy’"’"’’
cwd: None
Complete output (31 lines):
Traceback (most recent call last):
File “/usr/local/lib/python3.9/runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/local/lib/python3.9/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/srv/homeassistant/lib/python3.9/site-packages/pip/main.py”, line 26, in
sys.exit(_main())
File “/srv/homeassistant/lib/python3.9/site-packages/pip/_internal/cli/main.py”, line 73, in main
command = create_command(cmd_name, isolated=("–isolated" in cmd_args))
File “/srv/homeassistant/lib/python3.9/site-packages/pip/_internal/commands/init.py”, line 104, in create_command
module = importlib.import_module(module_path)
File “/usr/local/lib/python3.9/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 790, in exec_module
File “”, line 228, in _call_with_frames_removed
File “/srv/homeassistant/lib/python3.9/site-packages/pip/_internal/commands/install.py”, line 17, in
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
File “/srv/homeassistant/lib/python3.9/site-packages/pip/_internal/cli/req_command.py”, line 22, in
from pip._internal.req.constructors import (
File “/srv/homeassistant/lib/python3.9/site-packages/pip/_internal/req/init.py”, line 10, in
from .req_install import InstallRequirement
File “/srv/homeassistant/lib/python3.9/site-packages/pip/_internal/req/req_install.py”, line 10, in
import uuid
File “/srv/homeassistant/lib/python3.9/site-packages/uuid.py”, line 138
if not 0 <= time_low < 1<<32L:
^
SyntaxError: invalid syntax

ERROR: Command errored out with exit status 1: /srv/homeassistant/bin/python3.9 /srv/homeassistant/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-sarxwwsy/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple – ‘setuptools>=40.6.0’ wheel ‘cffi>=1.12; platform_python_implementation != ‘"’"‘PyPy’"’"’’ Check the logs for full command output.
WARNING: You are using pip version 20.2.4; however, version 21.0.1 is available.
You should consider upgrading via the ‘/srv/homeassistant/bin/python3.9 -m pip install --upgrade pip’ command.