Installationsprozess
- deviloper
- Erledigt
-
-
Hallo Rookie,
vielen Dank für Deine Hilfe.
Der erste Block, also die Installation, scheint geklappt zu haben. Jedenfalls habe ich keine Fehlermeldung erhalten.
Probleme habe ich beim Anapssen der setup.py: (Ich mache es mit dem TExteditor)
Zeile 52 from pip.req import parse_requirements
muss gelöscht und ersetzt werden durch die
6 Zeilen def parse requirements... bis ...install_reqs ?
Die anderen Zeilen, also 53-59 rutschen nach unten, werden also nicht ersetzt..?
Und wie starte ich danach DoorPi, am Besten automatisiert beim Booten, als daemon ?Danke für Deine Geduld....
piroer
Hallo ich habe es gerade auch installiert, ich musste ein paar Änderungen vornhemen aber im Grunde ist die Installation durchgelaufen, und die meisten Änderungen sind in diesem Blog versteckt.
Codegit clone https://github.com/motom001/DoorPi.git -b master /tmp/DoorPi curl https://bootstrap.pypa.io/pip/3.5/get-pip.py -o get-pip.py sudo apt-get install python-watchdog python get-pip.py cd /tmp/DoorPi sudo python -m pip install --upgrade pip sudo python -m pip install --upgrade setuptools
Jetzt müssen wir die setup.py modifizieren (Zeile 52) (entweder über SCP oder per nano/vi/etc.):
durch
Pythonfrom setuptools import setup, find_packages def parse_requirements(filename): """ load requirements from a pip requirements file """ lineiter = (line.strip() for line in open(filename)) return [line for line in lineiter if line and not line.startswith("#")] install_reqs = parse_requirements(os.path.join(base_path, 'requirements.txt')) reqs = install_reqs
von hand läuft es, nur wenn ich den daemon starte bekomme ich noch flogenden fehler, vielleicht kann da jemand aushelfen
Code
Alles anzeigenApr 10 09:58:26 raspberrypi systemd[1]: Starting LSB: DoorPi... Apr 10 09:58:26 raspberrypi doorpi[5834]: ___ ___ _ Apr 10 09:58:26 raspberrypi doorpi[5834]: / \___ ___ _ __ / _ (_) VoIP Door-Intercomstation with Raspberry Pi Apr 10 09:58:26 raspberrypi doorpi[5834]: / /\ / _ \ / _ \| '__/ /_)/ | version: 2.5.1 Apr 10 09:58:26 raspberrypi doorpi[5834]: / /_// (_) | (_) | | / ___/| | license: CC BY-NC 4.0 Apr 10 09:58:26 raspberrypi doorpi[5834]: /___,' \___/ \___/|_| \/ |_| URL: <https://github.com/motom001/DoorPi> Apr 10 09:58:26 raspberrypi doorpi[5834]: Authors: Thomas Meissner <motom001@gmail.com> Apr 10 09:58:26 raspberrypi doorpi[5834]: Supporter: Phillip Munz <office@businessaccess.info> Apr 10 09:58:26 raspberrypi doorpi[5834]: Hermann Dötsch <doorpi1@gmail.com> Apr 10 09:58:26 raspberrypi doorpi[5834]: Dennis Häußler <haeusslerd@outlook.com> Apr 10 09:58:26 raspberrypi doorpi[5834]: Hubert Nusser <hubsif@gmx.de> Apr 10 09:58:26 raspberrypi doorpi[5834]: Michael Hauer <frrr@gmx.at> Apr 10 09:58:26 raspberrypi doorpi[5834]: Andreas Schwarz <doorpi@schwarz-ketsch.de> Apr 10 09:58:26 raspberrypi doorpi[5834]: Max Rößler <max_kr@gmx.de> Apr 10 09:58:26 raspberrypi doorpi[5834]: missing someone? -> sorry -> mail me Apr 10 09:58:26 raspberrypi doorpi[5834]: Traceback (most recent call last): Apr 10 09:58:26 raspberrypi doorpi[5834]: File "/usr/local/bin/doorpi_cli", line 11, in <module> Apr 10 09:58:26 raspberrypi doorpi[5834]: load_entry_point('DoorPi==2.5.1', 'console_scripts', 'doorpi_cli')() Apr 10 09:58:26 raspberrypi doorpi[5834]: File "/usr/local/lib/python2.7/dist-packages/DoorPi-2.5.1-py2.7.egg/doorpi/main.py", line 16$ Apr 10 09:58:26 raspberrypi doorpi[5834]: raise SystemExit(main_as_daemon(sys.argv)) Apr 10 09:58:26 raspberrypi doorpi[5834]: File "/usr/local/lib/python2.7/dist-packages/DoorPi-2.5.1-py2.7.egg/doorpi/main.py", line 12$ Apr 10 09:58:26 raspberrypi doorpi[5834]: daemon_runner = runner.DaemonRunner(doorpi.DoorPi(parsed_arguments)) Apr 10 09:58:26 raspberrypi doorpi[5834]: File "/usr/local/lib/python2.7/dist-packages/daemon/runner.py", line 119, in __init__ Apr 10 09:58:26 raspberrypi doorpi[5834]: app.pidfile_path, app.pidfile_timeout) Apr 10 09:58:26 raspberrypi doorpi[5834]: File "/usr/local/lib/python2.7/dist-packages/daemon/runner.py", line 304, in make_pidlockfile Apr 10 09:58:26 raspberrypi doorpi[5834]: lockfile = pidfile.TimeoutPIDLockFile(path, acquire_timeout) Apr 10 09:58:26 raspberrypi doorpi[5834]: File "/usr/local/lib/python2.7/dist-packages/daemon/pidfile.py", line 40, in __init__ Apr 10 09:58:26 raspberrypi doorpi[5834]: super().__init__(path, *args, **kwargs) Apr 10 09:58:26 raspberrypi doorpi[5834]: TypeError: super() takes at least 1 argument (0 given) Apr 10 09:58:26 raspberrypi systemd[1]: doorpi.service: Control process exited, code=exited, status=1/FAILURE Apr 10 09:58:26 raspberrypi systemd[1]: doorpi.service: Failed with result 'exit-code'. Apr 10 09:58:26 raspberrypi systemd[1]: Failed to start LSB: DoorPi.
-
Leider Ärgern mich die Kollegen aus Montabaur gerade, so das ich seit Freitag kein Internet habe. Kann also nur sporadisch Antworten.
Wenn du meine Anleitung komplett ausgeführt hast, hast du den Daemon bereits initialisiert und gestartet
in der Setup.py musst du
Pythonfrom setuptools import setup, find_packages from pip.req import parse_requirements install_reqs = parse_requirements(os.path.join(base_path, 'requirements.txt'), session=uuid.uuid1()) reqs = [str(req.req) for req in install_reqs]
durch
Pythonfrom setuptools import setup, find_packages def parse_requirements(filename): """ load requirements from a pip requirements file """ lineiter = (line.strip() for line in open(filename)) return [line for line in lineiter if line and not line.startswith("#")] install_reqs = parse_requirements(os.path.join(base_path, 'requirements.txt')) reqs = install_reqs
ersetzen.
-
Ok, genau so hatte ich es.
Nach einem Neustart ist jetzt kein Ordner /tmp/DoorPi mehr da...
aber mehrere systemd-private-a332033..... ordner
wo würde ich denn die Zugangsdaten zum SIP Server eintragen..?
weder mit ps noch mit top / htop wird mir ein DoorPi Prozess angezeigt.
-
Mach doch mal
Nach einem Neustart ist jetzt kein Ordner /tmp/DoorPi mehr da...
Ist ja auch ein temp Ordner, und wird nach jedem Neustart gelöscht
Zitatwo würde ich denn die Zugangsdaten zum SIP Server eintragen..?
Ordner /usr/local/etc/DoorPi
ein bisschen musst du dich schon selber rein fuxen. Es gibt auch Anleitungen, die sind zwar nicht mehr aktuell geben aber sinnvolle Infos.
Ansonsten bitte für Probleme die nichts mit der Installation zu tun haben, einen neuen Post erstellen sonst muss der nächste der Probleme mit der Installation hat 15 Seiten durchlesen
-
hmmmmmmm... ich dachte eigentlich, bei der Installation sei alles gut gegangen..... sieht aber nicht so aus:
pi@raspberrypi:~ $ sudo systemctl stop doorpi
Failed to stop doorpi.service: Unit doorpi.service not loaded.
pi@raspberrypi:~ $ sudo systemctl start doorpi
Failed to start doorpi.service: Unit doorpi.service not found.
Auf jeden Fall vielen Dank für Deine Hilfe.
Ich seh' mir mal die Anleitungen durch.
Vielleicht ist das aber auch zu komplex für mich Noob...
ich sollte es ja wenigstens in Grundzügen verstehen, damit ich es bei Bedarf auch warten und konfigurieren kann.
-
wie hast du den die setup.py geändert ?
-
Mit dem Texteditor.
(Ich konnte gestern plötzlich nicht mehr posten, bekam Fehlermeldungen, hab mich mehrfach neu angemeldet, auch neu registriert, die
email adresse des BoardAdmins ist auch defekt...da läuft nix glatt hier !)
-
Welchen Editor hast du denn verwendet? und posten mal deine setup.py
-
"Mousepad" , also den im Raspian integrierten Editor.
und der Ordner /usr/local/etc/ ist leer ?!
-
so, hab also nochmal eine komplette Neuinstallation gemacht, inklusive frischem OS.
hier die komplette logs der Befehle:
pi@raspberrypi:~ $ git clone https://github.com/motom001/DoorPi.git -b master /tmp/DoorPi
Klone nach '/tmp/DoorPi' ...
remote: Enumerating objects: 2286, done.
remote: Total 2286 (delta 0), reused 0 (delta 0), pack-reused 2286
Empfange Objekte: 100% (2286/2286), 2.21 MiB | 3.35 MiB/s, Fertig.
L\u00f6se Unterschiede auf: 100% (1389/1389), Fertig.
pi@raspberrypi:~ $ curl https://bootstrap.pypa.io/pip/3.5/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1863k 100 1863k 0 0 4916k 0 --:--:-- --:--:-- --:--:-- 4916k
pi@raspberrypi:~ $ sudo apt-get install python-watchdog
Paketlisten werden gelesen... Fertig
Abh\u00e4ngigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Das folgende Paket wurde automatisch installiert und wird nicht mehr ben\u00f6tigt:
python-colorzero
Verwenden Sie \u00bbsudo apt autoremove\u00ab, um es zu entfernen.
Die folgenden zus\u00e4tzlichen Pakete werden installiert:
python-argcomplete python-argh python-pathtools python-yaml
Die folgenden NEUEN Pakete werden installiert:
python-argcomplete python-argh python-pathtools python-watchdog python-yaml
0 aktualisiert, 5 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es m\u00fcssen 299 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 1.711 kB Plattenplatz zus\u00e4tzlich benutzt.
M\u00f6chten Sie fortfahren? [J/n] j
Holen:1 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf python-argcomplete all 1.8.1-1 [29,2 kB]
Holen:2 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf python-pathtools all 0.1.2-2 [11,0 kB]
Holen:3 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf python-argh all 0.26.2-1 [24,9 kB]
Holen:4 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf python-yaml armhf 3.13-2 [118 kB]
Holen:5 http://mirror1.hs-esslingen.de…ive.raspbian.org/raspbian buster/main armhf python-watchdog all 0.9.0-1 [116 kB]
Es wurden 299 kB in 1 s geholt (299 kB/s).
Vormals nicht ausgew\u00e4hltes Paket python-argcomplete wird gew\u00e4hlt.
(Lese Datenbank ... 98832 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../python-argcomplete_1.8.1-1_all.deb ...
Entpacken von python-argcomplete (1.8.1-1) ...
Vormals nicht ausgew\u00e4hltes Paket python-pathtools wird gew\u00e4hlt.
Vorbereitung zum Entpacken von .../python-pathtools_0.1.2-2_all.deb ...
Entpacken von python-pathtools (0.1.2-2) ...
Vormals nicht ausgew\u00e4hltes Paket python-argh wird gew\u00e4hlt.
Vorbereitung zum Entpacken von .../python-argh_0.26.2-1_all.deb ...
Entpacken von python-argh (0.26.2-1) ...
Vormals nicht ausgew\u00e4hltes Paket python-yaml wird gew\u00e4hlt.
Vorbereitung zum Entpacken von .../python-yaml_3.13-2_armhf.deb ...
Entpacken von python-yaml (3.13-2) ...
Vormals nicht ausgew\u00e4hltes Paket python-watchdog wird gew\u00e4hlt.
Vorbereitung zum Entpacken von .../python-watchdog_0.9.0-1_all.deb ...
Entpacken von python-watchdog (0.9.0-1) ...
python-argcomplete (1.8.1-1) wird eingerichtet ...
python-yaml (3.13-2) wird eingerichtet ...
python-pathtools (0.1.2-2) wird eingerichtet ...
python-argh (0.26.2-1) wird eingerichtet ...
python-watchdog (0.9.0-1) wird eingerichtet ...
Trigger f\u00fcr man-db (2.8.5-2) werden verarbeitet ...
pi@raspberrypi:~ $
pi@raspberrypi:~ $ python get-pip.py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/…process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pip<21.0
Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1.5 MB 3.0 MB/s
Installing collected packages: pip
WARNING: The scripts pip, pip2 and pip2.7 are installed in '/home/pi/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.3.4
pi@raspberrypi:~ $ cd /tmp/DoorPi
pi@raspberrypi:/tmp/DoorPi $
pi@raspberrypi:/tmp/DoorPi $ sudo python -m pip install --upgrade pip
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pip
Downloading https://files.pythonhosted.org….3.4-py2.py3-none-any.whl (1.5MB)
100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1.5MB 92kB/s
Installing collected packages: pip
Found existing installation: pip 18.1
Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-20.3.4
pi@raspberrypi:/tmp/DoorPi $ sudo python -m pip install --upgrade setuptools
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/…process/#python-2-support pip 21.0 will remove support for this functionality.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting setuptools
Downloading setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 583 kB 3.1 MB/s
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 40.8.0
Uninstalling setuptools-40.8.0:
Successfully uninstalled setuptools-40.8.0
Successfully installed setuptools-44.1.1
pi@raspberrypi:/tmp/DoorPi $
danach habe ich die Setup.py geändert wie oben beschrieben, diesmal mit nano
und danach neustart.
-
tja, immer noch nichts....
/us/local/etc ist komplett leer
ist es ein Fehler, dass ich das "standard Raspberry Debian Full" genommen habe, statt des oben erwähnten "Raspbian Buster Lite" ?
-
Tja da haben wir auch schon Problem, du musst das setup.py direkt nach dem Download vom git ändern.
Zitat/usr/local/etc/
Bin mir gerade nicht sicher, und kann nicht nachschauen da ich im Urlaub bin.
Könnte aber auch /usr/local/Doorpi sein
-
So, also komplett frisches OS und Neuinstallation. Mal wieder.
Jetzt, direkt nach Zeile 1 : git clone.... und noch vor 2: curl ... habe ich die setup.py wie gehabt geändert, mit nano.
Der Ordner /tmp/DoorPi ist jetzt nicht mehr im Home - sondern im Root-Verzeichnis.
Danach habe ich die Punkte 2. - 8. erledigt (warum ist eigentlich 5. leer...?)
Den Prozess kann ich mit top oder htop nicht finden.
/usr/local/etc ist leer.
Was ist jetzt schiefgegangen ?
-
Zitat
Der Ordner /tmp/DoorPi ist jetzt nicht mehr im Home - sondern im Root-Verzeichnis.
Verstehe ich?
Zitatwarum ist eigentlich 5. leer...?)
Was meinst du mit Punkt 5 ?
Hast du bei der setup.py auf die richtige einrückung geachtet?
-
ja, korrekte Einrrückung.
anbei die setup.py , umbenannt zur setup.py.zip
-
So auf die schnelle kann ich auf meinem Smartphone auch keinen Fehler erkennen. Ab nachsten Sonntag kann ich wider an meinen PC dann schau ich mir das nochmal an. Es ist auch nicht ausgeschlossen das ein Update im OS die korrekte Installation verhindert. Wenn du solange warten kannst, schau ich es mir nochmal an. Hab mir auch schon uberlegt ein kleines script zu schreiben
Das einzige was du noch machen kannst, das ganze nur mit raspios Lite zu installieren
-
Hat keine Eile, auf jeden Fall vielen Dank....
Hab dieses Woche auch wenig Zeit, vielleicht versuche ich es mal mit raspios lite.
-
Also, ich hab jetzt mal mein Anleitung mit der aktuellen RaspberryOS Lite (21.5) ausprobiert, und die Installation hat ohne Probleme funktioniert.
Hattest du zwischenzeitlich auch Erfolg ?