I’m trying to install habapp on a 3.2m3 machine both manually or through openhabian-config, but it doesn’t install the dependencies:
openhabian@pi-shop3:/opt/habapp $ source bin/activate
(habapp) openhabian@pi-shop3:/opt/habapp $ habapp -config /etc/openhab/habap
Traceback (most recent call last):
File "/opt/habapp/bin/habapp", line 5, in <module>
from HABApp.__main__ import main
File "/opt/habapp/lib/python3.7/site-packages/HABApp/__init__.py", line 5, in <module>
import HABApp.__do_setup__
File "/opt/habapp/lib/python3.7/site-packages/HABApp/__do_setup__.py", line 4, in <module>
import pydantic # noqa: E402
ModuleNotFoundError: No module named 'pydantic'
(habapp) openhabian@pi-shop3:/opt/habapp $ deactivate
I’ve gone through a series of removing the directory, deinstalling from openhabian-config, rebooting, etc but can’t get it to do what it is supposed to do. What am I missing?
If I keep adding the missing dependencies one-by-one and re-running habapp each time, I eventually get to ‘paho’ which doesn’t install successfully. At this point I return to wanting a ‘clean’ installation and try to scrub the install.
Note - this is not on my main machine where habapp is running great.
Is there any error message when you try a clean install or does it fail silently?
The versions are properly pinned, so I am unsure why this would fail.
Could you remove the venv folder (/opt/habapp) and try a fresh install and show the error message?
I just tried a fresh installed (on windows) and it worked fine.
I did that in line 2 of those commands above…
I suspect it is something with my environment, not the code, but not sure how to debug…
trying on a different pi shortly
Hi there, same problem over here. I’ve run sudo python3 -m pip install pendulum==2.1.1 which completed successfully, but sudo python3 -m pip install habapp is still failing.
thanks, it seems this problem is fixed. At least running sudo python3 -m pip install habapp
now states Successfully installed habapp-0.31.1.
However, habapp still does not start. sudo systemctl status habapp returns
Active: failed (Result: exit-code) since Mon 2021-11-01 08:51:43 CET; 2s ago
Docs: https://habapp.readthedocs.io
Process: 2302 ExecStart=/opt/habapp/bin/habapp -c /etc/openhab/habapp (code=exited, status=1/FAILURE)
Main PID: 2302 (code=exited, status=1/FAILURE)
Nov 01 08:51:43 oh2021 habapp[2302]: Traceback (most recent call last):
Nov 01 08:51:43 oh2021 habapp[2302]: File "/opt/habapp/bin/habapp", line 5, in <module>
Nov 01 08:51:43 oh2021 habapp[2302]: from HABApp.__main__ import main
Nov 01 08:51:43 oh2021 habapp[2302]: File "/opt/habapp/lib/python3.7/site-packages/HABApp/__init__.py", line 5, in <module>
Nov 01 08:51:43 oh2021 habapp[2302]: import HABApp.__do_setup__
Nov 01 08:51:43 oh2021 habapp[2302]: File "/opt/habapp/lib/python3.7/site-packages/HABApp/__do_setup__.py", line 4, in <module>
Nov 01 08:51:43 oh2021 habapp[2302]: import pydantic # noqa: E402
Nov 01 08:51:43 oh2021 habapp[2302]: ModuleNotFoundError: No module named 'pydantic'
Nov 01 08:51:43 oh2021 systemd[1]: habapp.service: Main process exited, code=exited, status=1/FAILURE
Nov 01 08:51:43 oh2021 systemd[1]: habapp.service: Failed with result 'exit-code'.
Hm - it seems that pip thinks all HABApp dependencies are successfully installed when they are not.
Could you try install required packages by hand? Then it should start properly.
I was able to do this following the error messages when executing from the command line, with the exception that when it complains about ‘paho’ you need to install ‘paho-mqtt’. I did not specify version numbers and will test shortly, and use your list if it is not running properly.
However, I figured out that running habapp --config PATH_TO_CONFIGURATION_FOLDER
worked, so I checked for differences … and the command above resolved to /usr/local/bin/habapp instead of /opt/habapp/bin/habapp which was called in by habapp.service.
So after changing habapp.service to use /usr/local/bin/habapp I can finally explore habapp. Thanks!
I have the same issue with “pedantic” error. I have installed habapp using openhabian-config option. I am running latest openhabian 3.1. I installed all dependencies by hand, but it didn’t help.
penhabian@openhabian:~ $ ./habapp -c /etc/openhab/habapp/
-bash: ./habapp: No such file or directory
openhabian@openhabian:~ $ /opt/habapp/bin/habapp -c /etc/openhab/habapp/
Traceback (most recent call last):
File "/opt/habapp/bin/habapp", line 5, in <module>
from HABApp.__main__ import main
File "/opt/habapp/lib/python3.7/site-packages/HABApp/__init__.py", line 5, in <module>
import HABApp.__do_setup__
File "/opt/habapp/lib/python3.7/site-packages/HABApp/__do_setup__.py", line 4, in <module>
import pydantic # noqa: E402
ModuleNotFoundError: No module named 'pydantic'