Ankündigung

Einklappen
Keine Ankündigung bisher.

jsonread / python 3.10

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

    #16
    Hallo,
    ich häng mich hier mal mit dran ... Da ich auf ein neues System (Raspi + Bookworm) umgestiegen bin, habe ich jetzt das gleiche Problem ...
    jsonread Plugin startet nicht mehr mit der Fehlermeldung:

    Code:
    2024-06-02  11:57:32 ERROR    lib.metadata        plugin 'jsonread' v1.0.3: The Python version v3.10.14 is too new for this plugin. It requires a version up to v3.9.999. The plugin was not loaded.
    Ich glaube, da ich mit der virtuellen Python Environment installiert habe, scheint bei mir oben beschriebener Weg, die pyjq Version 2.6.0 in den requiremts.txt festzulegen und nachzuinstallieren, nicht zu funktionieren. Bei mir kommt dann folgende Fehlermeldung:
    Code:
    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.
    
        For more information visit http://rptl.io/venv
    
    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.
    Hat jemand einen Tipp für mich, wie ich bei mir das Problem beheben könnte??​

    Kommentar


      #17


      Zitat von Onkelandy Beitrag anzeigen
      Das Problem beim Start kannst du beheben, indem du /usr/local/smarthome/venvs/py_310/bin/pip3 install pyjq ausführst, denke ich.
      Warum das nicht sauber beim Start funzt, ist mir nicht ganz klar. Ist bei mir manchmal auch passiert, aber nicht immer. das mit den virtual envs macht irgendwie ab und an Probleme..
      kleine Ergänzung:

      Ich habe versucht, mit​
      Code:
      /usr/local/smarthome/venvs/py_shng/bin/pip3 install pyjq
      zu installieren. Das bricht auch ab mit folgender Fehlermeldung:

      Code:
            ....
            error: [Errno 2] No such file or directory: 'autoreconf'
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for pyjq
        Running setup.py clean for pyjq
      Failed to build pyjq
      ERROR: Could not build wheels for pyjq, which is required to install pyproject.toml-based projects

      Kommentar


        #18
        Zitat von Onkelandy Beitrag anzeigen
        Das mit der Pythonversion ist schräg, hab hier mal ein Issue erstellt: https://github.com/smarthomeNG/smarthome/issues/642
        Da das Plugin mit 3.11 funzt, hab ich das aktualisiert, kommt demnächst in den Develop. Gerne testen (manuell die Änderungen rüber ziehen) https://github.com/smarthomeNG/plugins/pull/921
        Das habe ich natürlich auch probiert und mir die V 1.0.4 mal händisch gezogen.
        Damit geht er bei mir beim SHNG Start in eine Endlosschleife und startet gar nicht mehr:

        Code:
        2024-06-02  17:31:02 WARNING  lib.shpypi          test_requirements: 'pyjq' not installed. Minimum v2.6.0 needed
        2024-06-02  17:31:02 WARNING  lib.shpypi          test_requirements: 'requests-file' not installed, any version needed
        2024-06-02  17:31:02 NOTICE   lib.shpypi          Installing plugin requirements for the current user, please wait...
        2024-06-02  17:31:02 NOTICE   lib.shpypi          Using auto-determined PIP: '/usr/local/smarthome/venvs/py_shng/bin/pip3'
        2024-06-02  17:31:04 NOTICE   lib.shpypi          Running in a virtualenv environment - installing plugin requirements only to current virtual environment, please wait...
        2024-06-02  17:31:05 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.
            
            For more information visit http://rptl.io/venv
        
        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-06-02  17:31:05 CRITICAL lib.smarthome       Python package requirements for configured plugins are not met and unable to install those requirements
        2024-06-02  17:31:05 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-06-02  17:31:05 CRITICAL lib.smarthome       Aborting
        
        ​

        Kommentar


          #19
          Zitat von ooUrmeloo Beitrag anzeigen
          Ich habe versucht, mit​ Code:

          /usr/local/smarthome/venvs/py_shng/bin/pip3 install pyjq
          zu installieren. Das bricht auch ab mit folgender Fehlermeldung:
          Code:
          pip3 install --upgrade pyjq
          geht nicht?

          Kommentar


            #20
            Am besten nochmals manuell probieren. Wegen autoreconf siehe hier: https://github.com/Azure/azure-funct...ls/issues/1111

            Kommentar


              #21
              Wenn man die Fehlermeldung „could not build…“ im Web sucht, gibt es ein paar Treffer, u.a. auf Stackoverflow. Einer verweist auf die Projektseite von pyjq und die dort genannten Voraussetzungen:
              You will need flex, bison (3.0 or newer), libtool, make, automake and autoconf to build jq. Install them by Homebrew, APT or other way
              . Vermutlich wird auch dh-autoreconv benötigt. Das passt auch zu der Fehlermeldung.

              Gruß
              Wolfram

              Kommentar


                #22
                Zitat von Sipple Beitrag anzeigen

                Code:
                pip3 install --upgrade pyjq
                geht nicht?
                nein ... gleiche Fehlermeldung:
                Code:
                ...
                      error: [Errno 2] No such file or directory: 'autoreconf'
                      [end of output]
                
                  note: This error originates from a subprocess, and is likely not a problem with pip.
                  ERROR: Failed building wheel for pyjq
                  Running setup.py clean for pyjq
                Failed to build pyjq
                ERROR: Could not build wheels for pyjq, which is required to install pyproject.toml-based projects

                Kommentar


                  #23
                  Zitat von wvhn Beitrag anzeigen
                  Wenn man die Fehlermeldung „could not build…“ im Web sucht, gibt es ein paar Treffer, u.a. auf Stackoverflow. Einer verweist auf die Projektseite von pyjq und die dort genannten Voraussetzungen:
                  . Vermutlich wird auch dh-autoreconv benötigt. Das passt auch zu der Fehlermeldung.

                  Gruß
                  Wolfram
                  probier ich gleich mal aus ...

                  Danke euch allen aber schon mal für die Hilfe!

                  Kommentar


                    #24
                    gefühlt ein Schritt weiter gekommen ...
                    Ich habe flex, bison und libtool installiert. Rest war schon drauf.
                    Mit
                    Code:
                    pip3 install --upgrade pyjq
                    lief die pyjq Installation dann durch.

                    jsonread startet aber trotzdem nicht ... :-(

                    Mit V1.0.3 kommt weiterhin die Fehlermeldung:
                    Code:
                    2024-06-03  19:55:02 ERROR    lib.metadata        plugin 'jsonread' v1.0.3: The Python version v3.10.14 is too new for this plugin. It requires a version up to v3.9.999. The plugin was not loaded.
                    Mit V1.0.4 wieder die Dauerschleife mit:
                    Code:
                    2024-06-03  20:02:20 WARNING  lib.shpypi          test_requirements: 'requests-file' not installed, any version needed
                    2024-06-03  20:02:20 NOTICE   lib.shpypi          Installing plugin requirements for the current user, please wait...
                    2024-06-03  20:02:20 NOTICE   lib.shpypi          Using auto-determined PIP: '/usr/local/smarthome/venvs/py_shng/bin/pip3'
                    2024-06-03  20:02:21 NOTICE   lib.shpypi          Running in a virtualenv environment - installing plugin requirements only to current virtual environment, please wait...
                    2024-06-03  20:02: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.
                        
                        For more information visit http://rptl.io/venv
                    
                    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-06-03  20:02:22 CRITICAL lib.smarthome       Python package requirements for configured plugins are not met and unable to install those requirements
                    2024-06-03  20:02: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-06-03  20:02:22 CRITICAL lib.smarthome       Aborting
                    pyjq kommt nicht mehr, aber den versteh ich nicht ganz.
                    Code:
                    test_requirements: 'requests-file' not installed, any version needed
                    ​
                    "requests-file" ist doch kein Package ...?!

                    Kommentar


                      #25
                      Doch ist es

                      Kommentar


                        #26
                        Zitat von Onkelandy Beitrag anzeigen
                        Doch ist es
                        ok ... dann kommt mal wieder der Linux-Laie zum Vorschein ... :-)

                        Ich hab's hiermit versucht:
                        Code:
                        sudo apt-get install -y python3-requests-file
                        Wurde auch installiert aber leider keine Änderung bzgl. Fehlermeldung.
                        Was mach ich jetzt schon wieder falsch?

                        Kommentar


                          #27
                          ok ok ... hab's selber kapiert ...

                          Code:
                           pip install requests-file
                          ​
                          Damit - und der V1.0.4 hat's funktioniert!
                          Danke nochmal!

                          Kommentar


                            #28
                            Setz das mal ins etc/smarthome.yaml File
                            pip_command: /usr/local/smarthome/venvs/py_310/bin/python3 -m pip

                            So klappt es bei mir​

                            Kommentar


                              #29
                              Zitat von Onkelandy Beitrag anzeigen
                              Setz das mal ins etc/smarthome.yaml File
                              pip_command: /usr/local/smarthome/venvs/py_310/bin/python3 -m pip

                              So klappt es bei mir​
                              Was meinst Du?
                              Anstelle der V1.0.4.?
                              Mit der funktioniert's bei mir ja jetzt auch wieder.
                              Kann das bei Bedarf aber gerne mal probieren. Heute schaff ich's aber nicht mehr.

                              Kommentar


                                #30
                                Mit dem ganzen hin und her in diesem Thread komme ich nicht klar.
                                was soll ich denn jetzt in dieser Situation machen ?
                                Code:
                                2024-11-12  18:39:34 NOTICE   lib.smarthome       --------------------   Init SmartHomeNG v1.10.0-master (4b25822a0)   --------------------
                                2024-11-12  18:39:34 NOTICE   lib.smarthome       Running in Python interpreter 'v3.11.2 final' in virtual environment, from directory /usr/local/smarthome
                                2024-11-12  18:39:34 NOTICE   lib.smarthome        - operating system 'Debian GNU/Linux 12 (bookworm)' (pid=1166290)
                                2024-11-12  18:39:34 NOTICE   lib.smarthome        - on 'Raspberry Pi (Rev. c03114)'
                                2024-11-12  18:39:36 NOTICE   lib.smarthome        - Nutze Feiertage für Land 'DE', Provinz 'NW', benutzerdefinierte(r) Feiertag(e) nicht definiert
                                2024-11-12  18:39:44 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

                                Lädt...
                                X