Error python 3.11 + frozenlist 1.3.0

      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/homeassistant/py311hass
/include -I/usr/local/opt/python-3.11/include/python3.11 -c frozenlist/_frozenlist.c -o build/temp.li
nux-aarch64-cpython-311/frozenlist/_frozenlist.o
      frozenlist/_frozenlist.c: In function ‘__Pyx_AddTraceback’:
      frozenlist/_frozenlist.c:432:62: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka 
‘struct _frame’}
        432 |   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
            |                                                              ^~
      frozenlist/_frozenlist.c:7127:5: note: in expansion of macro ‘__Pyx_PyFrame_SetLineNumber’
       7127 |     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for frozenlist
Failed to build frozenlist
ERROR: Could not build wheels for frozenlist, which is required to install pyproject.toml-based proje
cts

Hi,
anyone solved this ? How is it possible provide homeassistant support for python3.11 when the dependency frozenlist 1.3.0 doesn’t compile on python3.11 ? (fixed in 1.3.3 btw)

Hi, what is frozenlist?
I was curious but couldn’t find a clear explanation.

About python: I have installed, from source, v3.11.4

frozenlist is a python package, a dependency for homeassistant

So you are running HA Core?

Strange that I didn’t bump on that issue…

Maybe because the OS you use?
Are you upgrading on an existing HA setup or new install?

I created my new venv for Python 3.11 about a month ago and it includes frozenlist 1.3.3 in the site-packages folder, not sure why your install would still use 1.3.0

Python is built from the source.tgz here.
From your description it is not clear if you are too using Core-Installation with a Python venv?

If using a venv, I recommend always to create a new venv, don’t try to update the existing venv.
I also have seen instructions to create a requirements.txt with “pip freeze” in the old venv with HA and then build the new venv using this requirements.txt … didn’t work for me … tons of problems with dependencies

  • install new venv into new folder
  • follow instructions to install new HA into the new venv
  • change systemd-file to newly create venv
  • start HA, it will automatically pull missing dependencies

on any error, change the systemd-config back to the old venv-folder and have a running HA while trying to fix the issues.

Armin

That’s what I did too.

not sure if it makes a difference: Which version of Python? I was using 3.11.3

Armin

I had HA working in a 3.11.3 venv, installed 3.11.4 from the tgz and updated the venv, without problems in debian bullseye.
I think it depends on the OS you’re using.

BTW: Nice to meet some core venv users here! :smiling_face_with_three_hearts:

I had 3.10.something.

Hi, thx for looking.
My setup is:

  • raspberry pi 4
  • gcc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110
  • fresh new python 3.11.4 env
  • (inside the new env), pip install homeassistant → fails on above error

anyone using hass core with python 3.11 on raspberry pi 4 ?

did you try to Install/update frozenlist to 1.3.3 manually with pip ( while venv is activated) prior to installing homeassistant?

Armin

I believe I tried, I will retry

hi, seems to install frozenlist==1.3.3 before starting hass works, thx