My setup has been working fine for a while but after a power outtage, I wasn’t able to start HA core properly (the system has been restarted multiple time since my last update, so this is strange).
So I get error from image_upload which would require libtiff.so.5. So I tried installing libtiff with pip. I don’t know if that would solve the problem.
So I tried pip install libtiff with pip, pip3, pip3.9,pip3.11 and it says I need numpy which is supposed to be installed. So I’ve installed numpy with all the above pip command. I still cannot install libtiff.
This is the output of pip3.11 install libtiff:
Collecting libtiff
Using cached libtiff-0.4.2.tar.gz (129 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
Collecting libtiff
Using cached libtiff-0.4.2.tar.gz (129 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "/hass/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/hass/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/hass/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-_a57xvve/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-_a57xvve/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-_a57xvve/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-_a57xvve/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 77, in <module>
ModuleNotFoundError: No module named 'numpy'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I’ve been able to install libtiff with: python3 -m pip install numpy --upgrade python3 -m pip install libtiff
But that doesn’t solve the problem.
This is the error I get: Setup failed for 'image_upload': Unable to import component: Shared object "libtiff.so.5" not found, required by "_imaging.cpython-311.so"
You should only upgrade the system Python to a version directly supported by your distro. I’m unfortunately not very familiar with package management on FreeBSD, being a Debian user myself. But, what I’m getting at is that you should generally speaking only update Python with your distro’s upgrade and updates. If you install a specific Python version like above, it might not be a version your distro would’ve upgraded to, causing all kinds of dependency issues.
Your creating of the venv and all that looks fine. I’d recommend that you revert to the last known working Python version (the 3.9.x version you had) and then do a side-by-side Python install of 3.11 (or even better, 3.12) by building from sources.
I’m cherry picking numpy for a previous bug, Unfortunately, I did not keep notes of the actual bug but running HA on FreeBSD isn’t a smooth experience.
python 3.11 is currently the latest supported python on freebsd
Try to to downgrade your Python again, at least as a test to see if it resolves the issue.
Otherwise, all I can say is that an .so is a dynamically linked library, so you might be missing the symbols or something. You could try to install the dev package for libtiff. This will (should) provide the header files that might help the linker to resolve this.
Also check the respective changelogs for numpy and libtiff to see if there’s a specific version of libtiff that works with the version of numpy you installed.
EDIT: We have some issues with the major numpy v2 release at work. Not sure if that’s what you upgraded to.