Zitat von Onkelandy
Beitrag anzeigen
Ankündigung
Einklappen
Keine Ankündigung bisher.
Python 3.8 bzw. 3.9.: SmartHomeNG startet nicht
Einklappen
X
-
Das halte ich für keine gute Idee. Die Requirements sollten schon da angegeben werden, wo sie benutzt werden, also bei dem jeweiligen Plugin.
-
Ja, dann ist das Problem wenigstens weg. :-)Zitat von Onkelandy Beitrag anzeigenZum pluggit kann ich nix sagen.. das sdp_squeezebox ist noch in der Testphase. Das Problem mit dem Serial Modul habe ich hier bereits gepostet für Morg https://github.com/Morg42/plugins/issues/1
Das Problem resultiert aus dem Import in dieser Datei: https://github.com/Morg42/smarthome/.../connection.py
Am besten wäre vermutlich pyserial in die core reqs zu nehmen, sobald alles ausgiebig genug getestet ist.
Aber ich habe keine Ahnung, warum das pluggit-Plugin das will. Ich sehe da keinen Bezug zu. Wo fange ich denn an zu suchen?
So sollte das passen und wir sind auf der sicheren Seite.Zitat von Onkelandy Beitrag anzeigenTatsächlich gibt es für scipy aktuell wohl wieder nur fails
https://www.piwheels.org/project/scipy/
Ich habe die Maximalvariante in den requirements fürs uzsu Plugin auf 1.8.1 gesetzt, damit es da keine Probs mehr gibt. So sollte es passen!? https://github.com/onkelandy/plugins...quirements.txt
Einen Kommentar schreiben:
-
Zum pluggit kann ich nix sagen.. das sdp_squeezebox ist noch in der Testphase. Das Problem mit dem Serial Modul habe ich hier bereits gepostet für Morg https://github.com/Morg42/plugins/issues/1
Das Problem resultiert aus dem Import in dieser Datei: https://github.com/Morg42/smarthome/.../connection.py
Am besten wäre vermutlich pyserial in die core reqs zu nehmen, sobald alles ausgiebig genug getestet ist.
Tatsächlich gibt es für scipy aktuell wohl wieder nur fails
https://www.piwheels.org/project/scipy/
Ich habe die Maximalvariante in den requirements fürs uzsu Plugin auf 1.8.1 gesetzt, damit es da keine Probs mehr gibt. So sollte es passen!? https://github.com/onkelandy/plugins...quirements.txt
Einen Kommentar schreiben:
-
Deshalb schreibe ich das ja. Ich bin da auch irritiert. Ich verstehe auch nicht, wo das importiert wird. Jedenfalls nicht im __int__.py. Davor steht nichts relevantes:Zitat von bmx Beitrag anzeigenIch bin gerade sehr erstaunt: Wofür braucht squeezebox eine serielle Schnittstelle und wo im Code wird die importiert? Auch das pluggit läuft doch gar nicht mit serieller Schnittstelle sondern mit modbustcp?
Was steht denn vor den vier Zeilen in Deinem Log?
Code:2022-10-24 19:56:38 NOTICE lib.smarthome -------------------- Init SmartHomeNG v1.9.2-master (cc57a0ad6) -------------------- 2022-10-24 19:56:38 NOTICE lib.smarthome Running in Python interpreter 'v3.9.2 final', from directory /usr/local/smarthome 2022-10-24 19:56:38 NOTICE lib.smarthome - on Linux-5.15.61-v7+-armv7l-with-glibc2.31 (pid=1166) 2022-10-24 19:56:38 NOTICE lib.smarthome - Loglevel NOTICE is set to value 31 because handler of root logger is set to level WARNING or higher - Set level of handler 'shng_warnings_file' to 'NOTICE'! 2022-10-24 19:56:49 NOTICE lib.smarthome - Nutze Feiertage für Land 'DE', Provinz 'BB', 1 benutzerdefinierte(r) Feiertag(e) definiert 2022-10-24 19:56:52 NOTICE lib.userfunctions Userfunctions importiert aus 'blink' v0.0.3 - Blinkfunktionen 2022-10-24 19:56:52 NOTICE lib.userfunctions Userfunctions importiert aus 'cc' v0.0.1 - Color Converter 2022-10-24 19:56:52 NOTICE lib.userfunctions Userfunctions importiert aus 'itools' v0.0.1 - Tools für Item-Funktionen 2022-10-24 19:56:54 WARNING plugins.cli CLI: You should set a password for this plugin. 2022-10-24 19:56:55 ERROR lib.plugin Plugin 'squeezebox' error importing Python package: No module named 'serial' 2022-10-24 19:56:55 ERROR lib.plugin Plugin 'squeezebox' initialization failed, plugin not loaded 2022-10-24 19:56:59 ERROR lib.plugin Plugin 'pluggit' error importing Python package: No module named 'serial_asyncio' 2022-10-24 19:56:59 ERROR lib.plugin Plugin 'pluggit' initialization failed, plugin not loaded 2022-10-24 19:57:27 WARNING plugins.db_addon Item 'Zentral.Wetter.pluggit.Temperatur.Gruenlandtemperatursumme' with database_addon_fct=gruenlandtempsumme ignored, since parameter using 'database_addon_params' not given. Item will be ignored. 2022-10-24 19:57:27 WARNING plugins.db_addon Item 'Zentral.Wetter.pluggit.Temperatur.Waermesumme' with database_addon_fct=waermesumme ignored, since parameter using 'database_addon_params' not given. Item will be ignored. 2022-10-24 19:57:44 NOTICE lib.smarthome -------------------- SmartHomeNG initialization finished --------------------
Damit läuft dann das squeezebox-Plugin (sdp_squeezebox). Aber nicht das pluggit-Plugin. Die Fehlermeldung mit "serial_asyncio" kommt dann immernoch.Zitat von Tom Bombadil Beitrag anzeigensudo pip3 install pyserial pymodbus
Einen Kommentar schreiben:
-
Das sudo läßt man wohl besser weg, es sei denn man nutzt alles nur mit sudo ...
Einen Kommentar schreiben:
-
sudo pip3 install pyserial pymodbusZitat von Cannon Beitrag anzeigenNo module named 'pymodbus.client.sync'"
/tom
Einen Kommentar schreiben:
-
Ich bin gerade sehr erstaunt: Wofür braucht squeezebox eine serielle Schnittstelle und wo im Code wird die importiert? Auch das pluggit läuft doch gar nicht mit serieller Schnittstelle sondern mit modbustcp?
Was steht denn vor den vier Zeilen in Deinem Log?
Einen Kommentar schreiben:
-
Noch ein kleines Update. Auch wenn es etwas offtopic ist, macht es vielleicht keinen Sinn einen neuen Thread dazu zu eröffnen. Aber ein paar Dinge laufen noch nicht wieder:
Das 1. Problem (squeezebox) konnte ich mit der Installation von pyserial lösen.Code:2022-10-24 19:56:55 ERROR lib.plugin Plugin 'squeezebox' error importing Python package: No module named 'serial' 2022-10-24 19:56:55 ERROR lib.plugin Plugin 'squeezebox' initialization failed, plugin not loaded 2022-10-24 19:56:59 ERROR lib.plugin Plugin 'pluggit' error importing Python package: No module named 'serial_asyncio' 2022-10-24 19:56:59 ERROR lib.plugin Plugin 'pluggit' initialization failed, plugin not loaded
Das 2. Problem (pluggit) lies sich weder damit lösen. Auch nicht mit der Installation von pyserial-asyncio. Als ich letzteres installiert hatte stand dann bei Start im Log: "Plugin 'pluggit' error importing Python package: No module named 'pymodbus.client.sync'". Sprich das pluggit-Plugin läuft immernoch nicht.
Aber es gibt aus meiner Sicht keine Notwendigkeit für beide. Was brauche ich denn dafür? Gibt es möglicherweise Abhängigkeiten, die man nicht auf den ersten Blick sieht? Und sollte man die ggf. in die requirements mit rein nehmen?
Einen Kommentar schreiben:
-
Da ich einen Raspberry Pi 3 Model B+ habe, sollte der das hier sein: Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64-bit SoC @ 1.4GHz.Zitat von Msinn Beitrag anzeigenScipy Installationen sind auf nicht x86 Prozessoren etwas heikel. Was für einen Prozessor setzt Du ein?
Einen Kommentar schreiben:
-
Scipy Installationen sind auf nicht x86 Prozessoren etwas heikel. Was für einen Prozessor setzt Du ein?
Einen Kommentar schreiben:
-
Kleines Update. Nachdem ich den Raspi nun auf bullseye aktualisiert habe und es immer noch nicht ging, habe ich nun das Problem gelöst. Standardmäßig will er immer die aktuelle scipy-Version installieren. Das schlägt aber immer fehl. Es ist maximal scipy 1.8.1 möglich. Ob das bei mir nur so ist oder ob die höhre Version nur mit Python 3.10 läuft kann ich nicht beurteilen.
Die Installation ging dann so:
oder auch so:Code:pip3 install scipy==1.8.1
Code:python3 -m pip install scipy==1.8.1
Zuletzt geändert von Cannon; 23.10.2022, 20:21.
Einen Kommentar schreiben:
-
Ich bin jetzt ein Stück weiter, aber so recht geht es noch nicht.
1. Es musste noch in den Umgebungsvariablen die richtige Python und Pip-version eingestellt werden:
Dann startete zwar SmartHomeNG, installierte noch die core-requirements, aber mehr passierte dann auch nicht.Code:sudo nano ~/.bashrc . ~/.bashrc
2. Es muss erst einmal noch pip aktualisiert werden.
3. Es mussten nun noch die weitere requirements installiert werden:Code:/usr/bin/python3 -m pip install --upgrade pip
Dann ging der Start auch (bei mir) mit Python 3.9.15. ABER es gab auch Fehler bei der Installation der requirements. Zum einen steht irgendwo immer noch die alte Version und dann bricht auch die Installation von wheel ab:Code:python3 -m pip install -r requirements/base.txt --user python3 -m pip install -r requirements/conf_all.txt --user
Und das warnings-log nach Start von SmartHomeNG sieht dann so aus:Code:Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Ignoring ruamel.yaml: markers 'python_version < "3.7"' don't match your environment Ignoring ruamel.yaml: markers 'python_version == "3.7"' don't match your environment Ignoring scipy: markers 'python_version < "3.7"' don't match your environment Requirement already satisfied: cheroot<=8.4.1 in /home/smarthome/.local/lib/python3.9/site-packages (from -r requirements/conf_all.txt (line 14)) (8.4.1) Requirement already satisfied: cherrypy>=8.1.2 in /home/smarthome/.local/lib/python3.9/site-packages (from -r requirements/conf_all.txt (line 17)) (18.8.0) Requirement already satisfied: ephem<=4.1.0,>=3.7 in /home/smarthome/.local/lib/python3.9/site-packages (from -r requirements/conf_all.txt (line 20)) (4.1) Requirement already satisfied: holidays>=0.9.11 in /home/smarthome/.local/lib/python3.9/site-packages (from -r requirements/conf_all.txt (line 23)) (0.16) Requirement already satisfied: iowait in /home/smarthome/.local/lib/python3.9/site-packages (from -r requirements/conf_all.txt (line 26)) (0.2) Requirement already satisfied: janus>=0.5.0 in /home/smarthome/.local/lib/python3.9/site-packages (from -r requirements/conf_all.txt (line 29)) (1.0.0) Requirement already satisfied: jinja2>=2.9 in /home/smarthome/.local/lib/python3.9/site-packages (from -r requirements/conf_all.txt (line 32)) (3.1.2) Collecting numpy Using cached https://www.piwheels.org/simple/numpy/numpy-1.23.4-cp39-cp39-linux_armv7l.whl (12.4 MB) Requirement already satisfied: paho-mqtt>=1.2.2 in /home/smarthome/.local/lib/python3.9/site-packa ges (from -r requirements/conf_all.txt (line 38)) (1.6.1) Requirement already satisfied: portalocker in /home/smarthome/.local/lib/python3.9/site-packages ( from -r requirements/conf_all.txt (line 41)) (2.6.0) Requirement already satisfied: psutil in /home/smarthome/.local/lib/python3.9/site-packages (from -r requirements/conf_all.txt (line 44)) (5.9.3) Requirement already satisfied: pyjwt>=1.6.4 in /home/smarthome/.local/lib/python3.9/site-packages (from -r requirements/conf_all.txt (line 47)) (2.6.0) Collecting pymodbus>=1.4.0 Using cached https://www.piwheels.org/simple/pymodbus/pymodbus-3.0.0-py2.py3-none-any.whl (137 k B) Collecting pymysql Using cached https://www.piwheels.org/simple/pymysql/PyMySQL-1.0.2-py3-none-any.whl (43 kB) Collecting pyotp>=2.6.0 Using cached https://www.piwheels.org/simple/pyotp/pyotp-2.7.0-py3-none-any.whl (12 kB) Requirement already satisfied: python-dateutil>=2.5.3 in /home/smarthome/.local/lib/python3.9/site -packages (from -r requirements/conf_all.txt (line 60)) (2.8.2) Collecting python-telegram-bot>=12.8.0 Using cached https://www.piwheels.org/simple/python-telegram-bot/python_telegram_bot-13.14-py3-n one-any.whl (514 kB) Requirement already satisfied: pytz in /home/smarthome/.local/lib/python3.9/site-packages (from -r requirements/conf_all.txt (line 66)) (2022.5) Requirement already satisfied: requests>=2.20.0 in /home/smarthome/.local/lib/python3.9/site-packa ges (from -r requirements/conf_all.txt (line 74)) (2.28.1) Requirement already satisfied: ruamel.yaml<=0.16.8,>=0.15.78 in /home/smarthome/.local/lib/python3 .9/site-packages (from -r requirements/conf_all.txt (line 83)) (0.16.7) Collecting scipy>=1.1.0 Using cached scipy-1.9.3.tar.gz (42.1 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [62 lines of output] The Meson build system Version: 0.63.3 Source dir: /tmp/pip-install-renmcoza/scipy_98d2ed2fc79b436bb4327fb16f0dd15f Build dir: /tmp/pip-install-renmcoza/scipy_98d2ed2fc79b436bb4327fb16f0dd15f/.mesonpy-tscxed0 d/build Build type: native build Project name: SciPy Project version: 1.9.3 C compiler for the host machine: cc (gcc 8.3.0 "cc (Raspbian 8.3.0-6+rpi1) 8.3.0") C linker for the host machine: cc ld.bfd 2.31.1 C++ compiler for the host machine: c++ (gcc 8.3.0 "c++ (Raspbian 8.3.0-6+rpi1) 8.3.0") C++ linker for the host machine: c++ ld.bfd 2.31.1 Host machine cpu family: arm Host machine cpu: armv7l Compiler for C supports arguments -Wno-unused-but-set-variable: YES Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached) Compiler for C supports arguments -Wno-unused-function: YES Compiler for C supports arguments -Wno-conversion: YES Compiler for C supports arguments -Wno-misleading-indentation: YES Compiler for C supports arguments -Wno-incompatible-pointer-types: YES Library m found: YES Fortran compiler for the host machine: gfortran (gcc 8.3.0 "GNU Fortran (Raspbian 8.3.0-6+rp i1) 8.3.0") Fortran linker for the host machine: gfortran ld.bfd 2.31.1 Compiler for Fortran supports arguments -Wno-conversion: YES Program cython found: YES (/tmp/pip-build-env-fjvedt__/overlay/bin/cython) Program pythran found: YES (/tmp/pip-build-env-fjvedt__/overlay/bin/pythran) Program cp found: YES (/bin/cp) Program python found: YES (/usr/local/bin/python3.9) Found pkg-config: /usr/bin/pkg-config (0.29) Run-time dependency threads found: YES ../../scipy/meson.build:40:0: ERROR: Command "/usr/local/bin/python3.9 -c import os; os.chdi r(".."); import numpy; print(numpy.get_include())" failed with status 1. A full log can be found at /tmp/pip-install-renmcoza/scipy_98d2ed2fc79b436bb4327fb16f0dd15f/ .mesonpy-tscxed0d/build/meson-logs/meson-log.txt + meson setup --native-file=/tmp/pip-install-renmcoza/scipy_98d2ed2fc79b436bb4327fb16f0dd15f /.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=/usr/local /tmp/pip-install-renm coza/scipy_98d2ed2fc79b436bb4327fb16f0dd15f /tmp/pip-install-renmcoza/scipy_98d2ed2fc79b436bb4327f b16f0dd15f/.mesonpy-tscxed0d/build Traceback (most recent call last): File "/home/smarthome/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in _process.py", line 351, in <module> main() File "/home/smarthome/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in _process.py", line 333, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/smarthome/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in _process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "/tmp/pip-build-env-fjvedt__/overlay/lib/python3.9/site-packages/mesonpy/__init__.py" , line 969, in get_requires_for_build_wheel with _project(config_settings) as project: File "/usr/local/lib/python3.9/contextlib.py", line 119, in __enter__ return next(self.gen) File "/tmp/pip-build-env-fjvedt__/overlay/lib/python3.9/site-packages/mesonpy/__init__.py" , line 948, in _project with Project.with_temp_working_dir( File "/usr/local/lib/python3.9/contextlib.py", line 119, in __enter__ return next(self.gen) File "/tmp/pip-build-env-fjvedt__/overlay/lib/python3.9/site-packages/mesonpy/__init__.py" , line 777, in with_temp_working_dir yield cls(source_dir, tmpdir, build_dir) File "/tmp/pip-build-env-fjvedt__/overlay/lib/python3.9/site-packages/mesonpy/__init__.py" , line 682, in __init__ self._configure(reconfigure=bool(build_dir) and not native_file_mismatch) File "/tmp/pip-build-env-fjvedt__/overlay/lib/python3.9/site-packages/mesonpy/__init__.py" , line 713, in _configure self._meson( File "/tmp/pip-build-env-fjvedt__/overlay/lib/python3.9/site-packages/mesonpy/__init__.py" , line 696, in _meson return self._proc('meson', *args) File "/tmp/pip-build-env-fjvedt__/overlay/lib/python3.9/site-packages/mesonpy/__init__.py" , line 691, in _proc subprocess.check_call(list(args)) File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['meson', 'setup', '--native-file=/tmp/pip-install-r enmcoza/scipy_98d2ed2fc79b436bb4327fb16f0dd15f/.mesonpy-native-file.ini', '-Ddebug=false', '-Dopti mization=2', '--prefix=/usr/local', '/tmp/pip-install-renmcoza/scipy_98d2ed2fc79b436bb4327fb16f0dd 15f', '/tmp/pip-install-renmcoza/scipy_98d2ed2fc79b436bb4327fb16f0dd15f/.mesonpy-tscxed0d/build']' returned non-zero exit status 1. [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.
Ich komme nicht mehr weiter.Code:2022-10-22 12:25:30 NOTICE lib.smarthome - Loglevel NOTICE is set to value 31 because handler of root logger is set to level WARNING or higher - Set level of handler 'shng_warnings_file' to 'NOTICE'! 2022-10-22 12:25:44 ERROR lib.shpypi test_requirements: 'numpy' not installed, any version needed 2022-10-22 12:25:44 ERROR lib.shpypi test_requirements: 'pymodbus' not installed. Minimum v1.4.0 needed 2022-10-22 12:25:44 ERROR lib.shpypi test_requirements: 'pymysql' not installed, any version needed 2022-10-22 12:25:44 ERROR lib.shpypi test_requirements: 'pyotp' not installed. Minimum v2.6.0 needed 2022-10-22 12:25:44 ERROR lib.shpypi test_requirements: 'python-telegram-bot' not installed. Minimum v12.8.0 needed 2022-10-22 12:25:44 ERROR lib.shpypi test_requirements: 'scipy' not installed. Minimum v1.1.0 needed 2022-10-22 12:25:44 ERROR lib.shpypi test_requirements: 'sqlvalidator' not installed, any version needed 2022-10-22 12:25:44 NOTICE lib.shpypi Installing plugin requirements for the current user, please wait... 2022-10-22 12:25:44 NOTICE lib.shpypi > using PIP command: 'python3 -m pip'
Hat jemand einen Tipp?
Einen Kommentar schreiben:
-
Jede Python Installation installiert seine eigenen Module. Die Module werden in den Verzeichnisbaum der Python installation installiert. Du musst die Requirements für jede Umgebung installierten (auch, wenn Du theoretisch 2 Installationen der selben Version auf dem Rechner hast).
Evtl. werden auch unterschiedliche Versionen der Module installert, je nach Erfordernis der Python Version.
Einen Kommentar schreiben:
-
Da ist gar nichts hinterlegt. Aber in den Kommentaren steht, dass man das PIP-Kommando anpassen kann. Das werde ich dann mal probieren. Das wird ja mein erster Ansatz sein. Danke erstmal.Zitat von Msinn Beitrag anzeigenEs gab Versionen, die Schwierigkeiten hatten das richtige PIP Kommando zu bestimmen. Evtl. ist auch in Deiner smarthome.yaml ein fester Pfad zu einem PIP Kommando hinterlegt. Dann zeigt der vermutlich auf eine Python 3.7.9 Installation.
Aber die sind ja installiert. Mit der 3.7. ging es doch auch. Oder braucht die 3.8. oder 3.9. andere requirements? Im Verzeichnis sind 4 Dateien:Zitat von Msinn Beitrag anzeigenDu kannst aber auch die Requirements vorab per Hand installieren, wie man es früher musste. Im Verzeichnis requirements findest Du dazu die notwendigen Dateien. Welche Dateien sind bei Dir in dem Verzeichnis vorhanden?
all.txt
base.txt
conf_all.txt
test.txt
Einen Kommentar schreiben:
-
Welche Version SmartHomeNG setzt Du ein?
Es gab Versionen, die Schwierigkeiten hatten das richtige PIP Kommando zu bestimmen. Evtl. ist auch in Deiner smarthome.yaml ein fester Pfad zu einem PIP Kommando hinterlegt. Dann zeigt der vermutlich auf eine Python 3.7.9 Installation.
Du kannst aber auch die Requirements vorab per Hand installieren, wie man es früher musste. Im Verzeichnis requirements findest Du dazu die notwendigen Dateien. Welche Dateien sind bei Dir in dem Verzeichnis vorhanden?
Einen Kommentar schreiben:


Einen Kommentar schreiben: