TurboJPEG error after installation

I installed Home Assistant Core and I get this message:

2022-02-27 18:01:46 ERROR (MainThread) [homeassistant.components.camera.img_util] Error loading libturbojpeg; Cameras may impact HomeKit performance
Traceback (most recent call last):
  File "/Users/server/Documents/homeassistant/lib/python3.9/site-packages/homeassistant/components/camera/img_util.py", line 96, in __init__
    TurboJPEGSingleton.__instance = TurboJPEG()
  File "/Users/server/Documents/homeassistant/lib/python3.9/site-packages/turbojpeg.py", line 297, in __init__
    self.__find_turbojpeg() if lib_path is None else lib_path)
  File "/Users/server/Documents/homeassistant/lib/python3.9/site-packages/turbojpeg.py", line 906, in __find_turbojpeg
    raise RuntimeError(
RuntimeError: Unable to locate turbojpeg library automatically. You may specify the turbojpeg library path manually.
e.g. jpeg = TurboJPEG(lib_path)

I am pretty sure that the installation ran TurboJPEG. What do I have to do? I am fairly new to Python on virtualenv on Macs.

FYI, you’re not using Home Assistant OS - you’re using the Home Assistant Core install method.

Your problem though is that the required development library or headers are missing.

You may be better off running Home Assistant OS in a virtual machine.

I understand but I don’t want to use a virtual machine if possible. I guess I can install this development library manually, right?

On the other hand the more I read into I should probably use Home Assistant OS. :innocent:
But since it doesn’t run on M1 Macs… this is not an option either…

Yes you can.

Google suggests that UTM will allow you to run an x86 VM on your M1 Mac.

Ok, that is an option. But Parallels failed already…

But if it will run natively on macOS on Python, I still prefer that to keep it simple.

What exactly are the disadvantages?
With Core I have to update HA and the custom packages manually. Since I use the Mac anyway, I have to update macOS manually as well.

I don‘t need snapshots, I have manual backups.

I guess I can install anything I need (and update manually). It might take more time, but it is doable, right?

Disadvantage is that you need to know how to troubleshoot problems like this - where libraries are missing. That and you need to rebuild the venv every December when the Python deprecation hits. This coming December will see support for Python 3.9 dropped, next December it’ll be 3.10, and so on.

Thanks, looks like I need to learn that.

Regarding the venv, will it just stop working?

You won’t be able to upgrade it beyond 2022.12 if you’re using Python 3.9. When the first release of 2023 comes out you’ll need to rebuild it with Python 3.10.

That’s basically just removing the existing venv and creating it fresh with Python 3.10.

So it will be best practice to make a new venv, install latest HA and update custom packages regularly or at least every time HA gets a new version.

A new version of Python, which happens once a year and is always called out in the release notes.

You want to update custom packages (whatever you mean by that) when there’s new versions of those.

Ok, so I just need to figure out what I am missing (such as the wrench symbol on the left). Is there a list what I can/have to install to get the most out of HA?

I don’t have the integrated editors and most important no ZWave-JS.

This could be made easier by the developers of HA. Instead suggesting to use a VM is kind of weird.

The “integrated editor” is Code Server, and you can install Z-Wave JS yourself.

The VM is the easy way. You’ve chosen one of the methods that requires more from you:

Conclusion: This is an expert installation method.

If you want easy then you want Home Assistant OS.

Well there you have it, I just ordered a Raspberry Pi 4…

It just doesn’t work properly on M1 Macs and UTM has a CPU load of 25 %, which is unacceptable.

Hope this makes it a lot easier.