so - probiert... optisch läuft damit alles durch. Alle Module wurden runtergeladen und installiert - behauptet das System zumindest. (das "pyserial" war früher das Richtige und ausreichend, das "serial" habe ich auch versucht, weil das Ergebnis....)
pi@raspberrypi:~ $ pipenv/bin/python3 -m pip install pyserial
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyserial
Downloading https://www.piwheels.org/simple/pyserial/pyserial-3.5-py2.py3-none-any.whl (90 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.6/90.6 kB 673.4 kB/s eta 0:00:00
Installing collected packages: pyserial
Successfully installed pyserial-3.5
pi@raspberrypi:~ $ pipenv/bin/python3 -m pip install serial
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting serial
Downloading https://www.piwheels.org/simple/serial/serial-0.0.97-py2.py3-none-any.whl (40 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.9/40.9 kB 577.6 kB/s eta 0:00:00
Collecting future>=0.17.1
Downloading https://www.piwheels.org/simple/future/future-1.0.0-py3-none-any.whl (491 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 491.3/491.3 kB 912.2 kB/s eta 0:00:00
Collecting pyyaml>=3.13
Downloading PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (732 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 732.2/732.2 kB 1.1 MB/s eta 0:00:00
Collecting iso8601>=0.1.12
Downloading https://www.piwheels.org/simple/iso8601/iso8601-2.1.0-py3-none-any.whl (7.5 kB)
Installing collected packages: pyyaml, iso8601, future, serial
Successfully installed future-1.0.0 iso8601-2.1.0 pyyaml-6.0.1 [b]serial-0.0.97[/b]
alles installiert - aber funktionieren tut es nicht
(pipenv) pi@raspberrypi:~ $ pip list
Package Version
-------------- -------
beautifulsoup4 4.12.3
cffi 1.16.0
cryptography 42.0.8
future 1.0.0
gurux_dlms 1.0.155
iso8601 2.1.0
lxml 5.2.2
paho-mqtt 2.1.0
pip 23.0.1
pycparser 2.22
pyserial 3.5
PyYAML 6.0.1
serial 0.0.97
setuptools 66.1.1
soupsieve 2.5
Der Aufruf des Programmes liefert dann aber :
python3 Smartmeter.py
Traceback (most recent call last):
File "/home/pi/Smartmeter.py", line 4, in <module>
import serial
ModuleNotFoundError: No module named 'serial'
Der Programmbeginn dazu sieht wie folgt aus:
import json
import sys
import os
import serial
from datetime import datetime
from binascii import unhexlify
from gurux_dlms.GXDLMSTranslator import GXDLMSTranslator
from gurux_dlms.TranslatorOutputType import TranslatorOutputType
from bs4 import BeautifulSoup
from Cryptodome.Cipher import AES
from time import sleep
import xml.etree.ElementTree as ET
import time
ich bin kurz davor diesen Bookworm-Müll zu entsorgen und mir noch rasch eine alte Version zu installieren (die bei mir ja schon sehr lange läuft, ist ja nichts neues) - solange es die noch gibt.🤢
Danke jedenfalls - theoretisch war der Ansatz richtig und hilfreich, nur funktioniert am Ende dann doch Essentielles nicht. Man fühlt sich wie unter Windows....