Ankündigung

Einklappen
Keine Ankündigung bisher.

Neuinstallation auf VM

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Neuinstallation auf VM

    Hallo,

    Ich plane demnächst meinen Raspi 2 (Sh.py + SV) auf eine Virtuelle Maschine zu übersiedeln. (Eigene SSD)
    Windows 10 bringt dafür bereits Hyper-V mit. Spricht etwas dagegen das auch zu nutzen? Nachteile zu VirtualBox, VMWare, etc?

    Ich würde natürlich gerne auch gleich zu smarthomeNG wechseln. Ist es bereits soweit für den daily use?

    mfg
    Markus

    #2
    Nimm VirtualBox - läuft auf nahezu allen Betriebssystemen und reicht für sh.py und visu völlig aus... bist zukünftig flexibler

    Kommentar


      #3
      Moin Markus,

      bei mir ist die aktuelle SmarthomeNG (master) stabil, ich habe meine VM und auch meine NUCs nach der Komplettanleitung wie im Wiki beschrieben installiert. knxd ist dafür die Basis, Onewire nutze ich allerdings nicht mehr direkt sondern über Hardwarebox/Arduino.

      Ob Du VMWare, Hyper-V oder VirtualBox nimmst, ist wohl Geschmacksfrage. Allerdings kommen bei Windows 10 doch rechthäufig Updates und damit Neustarts. Das hat dazu geführt, das ich Windows 10 nicht mehr als Host haben wollte und mir (allerdings statt eines Raspi) einen NUC 2820 hingehängt habe. Die kann man teilweise recht günstig als Barebones bekommen. Aus Deiner Sicht würde ich mir das also überlegen auf dem Raspi zu bleiben oder aber bei mehr Performance Wunsch dann auch NUC oder was ähnliches dezidiertes zu gehen.

      Gruß,
      Bernd

      Kommentar


        #4
        Hi,

        Ich hol mal meinen eigenen Uralt Thread raus. Aktuell betreibe ich sh.py + SV nach wie vor auf einem Raspi. Funktioniert auch soweit problemlos.
        Nun hab ich mir allerdings ein NAS mit Unraid zusammen gebaut und eine Debian 12 VM eingerichtet und hätte vor sh.py zu übersiedeln.

        Installation lt. Komplettanleitung.
        Als ich nun 'python3 bin/smarthome.py' zum ersten mal gestartet habe, kommt folgende Fehlermeldung...

        Code:
        smarthome@fuxl-home-vm-dev:~$ cd /usr/local/smarthome
        smarthome@fuxl-home-vm-dev:/usr/local/smarthome$ python3 bin/smarthome.py
        
        test_requirements: 'ephem' not installed. Minimum v3.7 needed
        test_requirements: 'holidays' not installed. Minimum v0.9.11 needed
        test_requirements: 'iowait' not installed, any version needed
        test_requirements: 'portalocker' not installed, any version needed
        test_requirements: 'psutil' not installed, any version needed
        test_requirements: 'ruamel.yaml' not installed. Minimum v0.15.78 needed
        test_requirements: 'xmltodict' not installed, any version needed
        
        Installing core requirements for the current user, please wait...
        python_bin_path=/usr/bin
        > using PIP command: '/usr/bin/pip3'
        
        ERROR:
        error: externally-managed-environment
        
        × This environment is externally managed
        ╰─> To install Python packages system-wide, try apt install
            python3-xyz, where xyz is the package you are trying to
            install.
        
            If you wish to install a non-Debian-packaged Python package,
            create a virtual environment using python3 -m venv path/to/venv.
            Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
            sure you have python3-full installed.
        
            If you wish to install a non-Debian packaged Python application,
            it may be easiest to use pipx install xyz, which will manage a
            virtual environment for you. Make sure you have pipx installed.
        
            See /usr/share/doc/python3.11/README.venv for more information.
        
        note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
        hint: See PEP 668 for the detailed specification.
        
        ERROR: Unable to install core requirements
        Use the commandline option --pip3_command to specify the path to the command
        ​
        Ich könnte jetzt einfach die fehlenden Packete manuell installieren, frage mich aber ob ich in Zukunft für neue requirements das gleiche Problem haben werde.

        Was meint ihr?

        mfg
        Markus

        Kommentar


          #5
          Das wurde bereits in mehreren Threads thematisiert.

          Mit Debian 12 kommt Python 3.11 und dort können mit pip nur Packages innerhalb eines virtuellen Python Environments installiert werden.

          Mögliche Lösungsansätze:
          • ältere Python Version installieren
          • warten bis SmartHomeNG 1.10 released wird. Dann wird ein virtuelles Python Environment eingerichtet und der Umgang damit ist dokumentiert
          • per Hand ein ein virtuelles Python Environment anlegen, in den Linux Service integrieren und hoffen, dass SmartHomeNG. 1.9.5 unter Python 3.11 läuft (ist offiziell nicht unterstützt)
          Zuletzt geändert von bmx; 28.01.2024, 19:29.
          Viele Grüße
          Martin

          There is no cloud. It's only someone else's computer.

          Kommentar


            #6
            Suche mal im Forum nach "Bookworm". Da findet Du Hinweise zu diesem Fehler. smarthomeNG läuft nicht ohne weiteres unter Python 3.11. Du müsstest einen Downgrade auf Python 3.9 machen, damit alles problemlos läuft, oder bis zum Release v1.10 warten.

            Gruß
            Wolfram

            EDIT: Sorry, Martin war schneller.

            Kommentar


              #7
              Ok, Danke euch. Das hab ich gelesen, wusste aber nicht, dass 3.11 in Debian 12 default ist.
              Dann werde ich mir mal die ISO von Debian bullseye runterladen. Danke für die Info.

              Ich verkneife mir jetzt mal die Frage wann es den 1.10 geben wird. :-)​

              mfg
              Markus
              Zuletzt geändert von fuxl66; 29.01.2024, 16:27.

              Kommentar


                #8
                Zitat von fuxl66 Beitrag anzeigen
                Ich verkneife mir jetzt mal die Frage wann es den 1.10 geben wird. :-)​
                Vor 'ner halben Stunde
                Viele Grüße
                Martin

                There is no cloud. It's only someone else's computer.

                Kommentar


                  #9
                  Zitat von Msinn Beitrag anzeigen
                  Vor 'ner halben Stunde
                  Zuerst vielen Dank für die tolle Arbeit und deine Zeit die du/ihr dafür aufbringt.

                  Ich habe nun in meine VM Debian 12.4. am Laufen und auch SH 1.10.

                  Ich hatte anfangs Probleme mit der Installation einiger requirements. Hab sie manuell mit dem angestellten '--break-system-packages' installiert bekommen.

                  pip3_error.log
                  Code:
                  ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
                  smarthome-warnings.log
                  Code:
                  2024-01-29  11:30:12 NOTICE   lib.smarthome       --------------------   Init SmartHomeNG v1.10.0-master (4b25822a0)   --------------------
                  2024-01-29  11:30:12 NOTICE   lib.smarthome       Running in Python interpreter 'v3.11.2 final' in virtual environment, from directory /usr/local/smarthome
                  2024-01-29  11:30:12 NOTICE   lib.smarthome        - operating system 'Debian GNU/Linux 12 (bookworm)' (pid=4907)
                  2024-01-29  11:30:13 NOTICE   lib.smarthome        - on 'Intel(R) Core(TM) i3-10105 CPU @ 3.70GHz'
                  2024-01-29  11:30:13 WARNING  lib.shpypi          test_requirements: 'lxml' not installed. Minimum v4.9.2 needed
                  2024-01-29  11:30:13 WARNING  lib.shpypi          test_requirements: 'pyserial' not installed. Minimum v3.4.0 needed
                  2024-01-29  11:30:13 WARNING  lib.shpypi          test_requirements: 'python-telegram-bot' not installed. Minimum v20.2 needed
                  2024-01-29  11:30:13 NOTICE   lib.shpypi          Installing plugin requirements for the current user, please wait...
                  2024-01-29  11:30:13 WARNING  lib.shpypi          PIP command read from smarthome.yaml: 'python3 -m pip'
                  2024-01-29  11:30:13 NOTICE   lib.shpypi          Using auto-determined PIP: 'python3 -m pip'
                  2024-01-29  11:30:14 ERROR    lib.shpypi          error: externally-managed-environment
                  
                  × This environment is externally managed
                  ╰─> To install Python packages system-wide, try apt install
                      python3-xyz, where xyz is the package you are trying to
                      install.
                      
                      If you wish to install a non-Debian-packaged Python package,
                      create a virtual environment using python3 -m venv path/to/venv.
                      Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
                      sure you have python3-full installed.
                      
                      If you wish to install a non-Debian packaged Python application,
                      it may be easiest to use pipx install xyz, which will manage a
                      virtual environment for you. Make sure you have pipx installed.
                      
                      See /usr/share/doc/python3.11/README.venv for more information.
                  
                  note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
                  hint: See PEP 668 for the detailed specification.
                  
                  2024-01-29  11:30:14 CRITICAL lib.smarthome       Python package requirements for configured plugins are not met and unable to install those requirements
                  2024-01-29  11:30:14 CRITICAL lib.smarthome       Do you have multiple Python3 Versions installed? Maybe PIP3 looks into a wrong Python environment. Try to configure pip_command in etc/smarthome.yaml
                  2024-01-29  11:30:14 CRITICAL lib.smarthome       Aborting​

                  Es scheint allerdings noch Probleme mit jsonread plugin
                  Es meckert meine python version an.
                  Code:
                  2024-01-29  12:05:17 ERROR    lib.metadata        plugin 'jsonread' v1.0.3: The Python version v3.11.2 is too new for this plugin. It requires a version up to v3.9.999. The plugin was not loaded.
                  Ist das schon gekannt?

                  /Markus

                  Kommentar


                    #10
                    Zitat von fuxl66 Beitrag anzeigen
                    Hab sie manuell mit dem angestellten '--break-system-packages' installiert bekommen.
                    Das ist das falsche Vorgehen. Schau mal in die Doku. Dort wird der Umgang mit den nun benötigten virtuellen Python Environments beschrieben.

                    Du solltest evtl. den Rechner neu aufsetzen, damit Du nicht aus Versehen System Packages von Debian am laufen hinderst.
                    Viele Grüße
                    Martin

                    There is no cloud. It's only someone else's computer.

                    Kommentar


                      #11
                      Ok, da hab ich wohl etwas übersehen.
                      Bzgl json plugin.....ich nehme an ich sollte hier vorerst eine python version unter 3.9.999 verwenden um die Funktion zu gewährleisten? (z.B 3.9.18 gibt es als download)

                      Generell gesprochen, gibt es einen Nachteil auf Debian bullseye zu bleiben?

                      P.S.: bezgl. Anleitung zum Thema smarhome.py als Dienst.
                      Im Falle von Bullseye und 1.10 Kombi.
                      Hier sollte der alte Eintrag für smarthome.service verwendet werden, korrekt?
                      Code:
                      [Unit]
                      Description=SmartHomeNG daemon
                      After=network.target
                      After=knxd.service
                      After=knxd.socket
                      
                      [Service]
                      Type=forking
                      ExecStart=/usr/bin/python3 /usr/local/smarthome/bin/smarthome.py
                      WorkingDirectory=/usr/local/smarthome
                      User=smarthome
                      PIDFile=/usr/local/smarthome/var/run/smarthome.pid
                      Restart=on-failure
                      TimeoutStartSec=900
                      RestartForceExitStatus=5
                      
                      [Install]
                      WantedBy=default.target​
                      Zuletzt geändert von fuxl66; 29.01.2024, 12:58.

                      Kommentar


                        #12
                        Zitat von fuxl66 Beitrag anzeigen
                        Ok, da hab ich wohl etwas übersehen.
                        Guckst Du hier Neuerungen im Release 1.10

                        Zitat von fuxl66 Beitrag anzeigen
                        Bzgl json plugin
                        Meinst Du jsonread? Wieso meinst Du Python 3.9?

                        Zitat von fuxl66 Beitrag anzeigen
                        Generell gesprochen, gibt es einen Nachteil auf Debian bullseye zu bleiben?
                        Bis Juli nicht. Im Debian Wiki ist für Bullseye das End of Life Date mit ~2024-07 angegeben.

                        Du kannst aber unter bookworm auch beliebige ältere Python Versionen installieren. Eine Beschreibung findest Du auch in der Doku: Referenz/Python Environment
                        Viele Grüße
                        Martin

                        There is no cloud. It's only someone else's computer.

                        Kommentar


                          #13
                          Zitat von Msinn Beitrag anzeigen
                          Meinst Du jsonread? Wieso meinst Du Python 3.9?
                          Referenz/Python Environment
                          Weil im LOG bzgl jsonread nur eine max python version von 3.9.999 ausgeben wird.
                          Deshalb bin ich nicht sicher ob ich mit 3.10.12 (lt. Anleitung) weiter kommen.

                          Code:
                          2024-01-29 12:05:17 ERROR lib.metadata plugin 'jsonread' v1.0.3: The Python version v3.11.2 is too new for this plugin. It requires a version up to v3.9.999. The plugin was not loaded.

                          Kommentar


                            #14
                            Ok, in den Requirements steht, dass eine Version von pyjq für neuere Versionen als 3.9 zur Verfügung steht. Ob es einen anderen Grund für die angegebene Python Max Version in den Metadaten gibt, kann evtl Onkelandy sagen. Er ist als Tester für das Plugin eingetragen.

                            Du kannst auch selber versuchen, ob ein neueres Python für Dich funktioniert. Dazu musst Du die Zeile
                            Code:
                                py_maxversion: 3.9             # maximum Python version to use for this plugin (leave empty if latest)
                            in der plugin.yaml des Plugins auskommentieren.
                            Viele Grüße
                            Martin

                            There is no cloud. It's only someone else's computer.

                            Kommentar


                              #15
                              Hi nochmal,

                              Ich habe nun nochmal eine neue VM mit Debian 12.4. und dem downgrade auf python auf 3.10.12.
                              Der smarthome.service hängt danach in einem loop mit folgendem Log Einträgen.

                              Soll ich jetzt die fehlenden packete manuell installieren?

                              Code:
                              2024-01-29  15:26:20 NOTICE   lib.smarthome       --------------------   Init SmartHomeNG v1.10.0-master (4b25822a0)   --------------------
                              2024-01-29  15:26:20 NOTICE   lib.smarthome       Running in Python interpreter 'v3.10.12 final' in virtual environment, from directory /usr/local/smarthome
                              2024-01-29  15:26:20 NOTICE   lib.smarthome        - operating system 'Debian GNU/Linux 12 (bookworm)' (pid=2404)
                              2024-01-29  15:26:21 NOTICE   lib.smarthome        - on 'Intel(R) Core(TM) i3-10105 CPU @ 3.70GHz'
                              2024-01-29  15:26:22 WARNING  lib.shpypi          test_requirements: 'lxml' not installed. Minimum v4.9.2 needed
                              2024-01-29  15:26:22 WARNING  lib.shpypi          test_requirements: 'pyjq' not installed, any version needed
                              2024-01-29  15:26:22 WARNING  lib.shpypi          test_requirements: 'pyserial' not installed. Minimum v3.4.0 needed
                              2024-01-29  15:26:22 WARNING  lib.shpypi          test_requirements: 'python-telegram-bot' not installed. Minimum v20.2 needed
                              2024-01-29  15:26:22 WARNING  lib.shpypi          test_requirements: 'requests-file' not installed, any version needed
                              2024-01-29  15:26:22 NOTICE   lib.shpypi          Installing plugin requirements for the current user, please wait...
                              2024-01-29  15:26:22 WARNING  lib.shpypi          PIP command read from smarthome.yaml: 'python3 -m pip'
                              2024-01-29  15:26:22 NOTICE   lib.shpypi          Using auto-determined PIP: 'python3 -m pip'
                              2024-01-29  15:26:22 ERROR    lib.shpypi          error: externally-managed-environment
                              
                              × This environment is externally managed
                              ╰─> To install Python packages system-wide, try apt install
                                  python3-xyz, where xyz is the package you are trying to
                                  install.
                                  
                                  If you wish to install a non-Debian-packaged Python package,
                                  create a virtual environment using python3 -m venv path/to/venv.
                                  Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
                                  sure you have python3-full installed.
                                  
                                  If you wish to install a non-Debian packaged Python application,
                                  it may be easiest to use pipx install xyz, which will manage a
                                  virtual environment for you. Make sure you have pipx installed.
                                  
                                  See /usr/share/doc/python3.11/README.venv for more information.
                              
                              note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
                              hint: See PEP 668 for the detailed specification.
                              
                              2024-01-29  15:26:22 CRITICAL lib.smarthome       Python package requirements for configured plugins are not met and unable to install those requirements
                              2024-01-29  15:26:22 CRITICAL lib.smarthome       Do you have multiple Python3 Versions installed? Maybe PIP3 looks into a wrong Python environment. Try to configure pip_command in etc/smarthome.yaml
                              2024-01-29  15:26:22 CRITICAL lib.smarthome       Aborting
                              2024-01-29  15:26:23 NOTICE   lib.smarthome       --------------------   Init SmartHomeNG v1.10.0-master (4b25822a0)   --------------------​
                              P.S.:
                              mein pip_command in smarthome.yaml = pip_command: "python3 -m pip"

                              Hat sich dieser geändert? Ich habe die neue mit meiner aktuellen aus dem PI überschrieben.

                              Zuletzt geändert von fuxl66; 29.01.2024, 15:42. Grund: P.S.:

                              Kommentar

                              Lädt...
                              X