• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
GUI-O Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login

GUI-O on Raspberry Pi 5

Scheduled Pinned Locked Moved
General Discussion
2
7
728
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    SteveV
    last edited by 4 May 2024, 12:36

    I have been following the example GUI-O and Boards - Raspberry Pi in order to install GUI-O onto my (new) RPi 5. (Details-Debian GNU/Linux , Version 12 Bookworm (aarch64))

    However, when trying to install the Python modules per the document ($ pip install paho-mqtt), I get the following 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."

    So I tried $apt install python3-paho-mqtt that resulted in different errors (Could not open lock file .... , and Unable to acquire the dpkg frontend lock .....)

    I have no idea where to go from here and would appreciate if someone might be able to give me a clue what I should do!
    Has anyone successfully installed on RPi 5?
    Cheers Steve

    K 1 Reply Last reply 4 May 2024, 14:45 Reply Quote 0
    • K
      kl3m3n @SteveV
      last edited by kl3m3n 5 Apr 2024, 16:49 4 May 2024, 14:45

      @SteveV Hi.

      First, try to reboot the RPi and retry.

      If this does not work, try running the commands with sudo, e.g.:

      sudo apt install python3-paho-mqtt
      

      Regards,
      Kl3m3n

      1 Reply Last reply Reply Quote 0
      • S
        SteveV
        last edited by 5 May 2024, 09:10

        Hi Kl3m3n,
        Thanks for your response.
        I had already done both this you suggested prior to my earlier post, however neither allowed installation of paho-mqtt.

        I checked the web for problem and found that if I used :-
        $ pip install paho-mqtt --break-system-packages

        the python modules successfully installed.
        Cheers

        1 Reply Last reply Reply Quote 0
        • S
          SteveV
          last edited by 5 May 2024, 09:24

          Hi Ki3m3n,

          I progressed to step 4 in GUI-O and Boards - Raspberry Pi - Setting up Pi OS,
          and completed each step up to step 6 however, running the now modified RPiMqtt.py resulted in the following error response:

          ////////////////////////////////
          slv05@raspberrypi:~/Projects/Mqtt $ python ./RPiMqtt.py
          Traceback (most recent call last):
          File "/home/slv05/Projects/Mqtt/./RPiMqtt.py", line 87, in <module>
          mqttClient = mqtt.Client(str(uuid.uuid4()))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/slv05/.local/lib/python3.11/site-packages/paho/mqtt/client.py", line 772, in init
          raise ValueError(
          ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see docs/migrations.rst for details
          slv05@raspberrypi:~/Projects/Mqtt $
          \\\\\\\\\\\\\\\\

          I didn't progress any further as I suspected things might go awry if the RPiMqtt.py wasn't working properly.

          Can you identify what the problem might be?

          I double checked the In and Out tokens within the modified RPiMqtt.py file on the RPi and all OK.

          Incidentally, what would have I seen on the RPi if the RPiMqtt.py had worked?

          K 1 Reply Last reply 7 May 2024, 19:40 Reply Quote 0
          • K
            kl3m3n @SteveV
            last edited by 7 May 2024, 19:40

            @SteveV said in GUI-O on Raspberry Pi 5:

            Unsupported callback API version: version 2.0 added a callback_api_version, see docs/migrations.

            Hi, try changing:

            mqttClient = mqtt.Client(str(uuid.uuid4()))

            to:

            mqttClient = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1, str(uuid.uuid4()))

            in RPiMqtt.py.

            Source:
            https://stackoverflow.com/questions/77984857/paho-mqtt-unsupported-callback-api-version-error

            I will try to update the script ASAP.

            Best regards,
            Klemen

            1 Reply Last reply Reply Quote 0
            • S
              SteveV
              last edited by 7 May 2024, 23:16

              Hi Klemen,
              Thank you so much for responding to my previous post.
              The change you suggested fixed the issue and I successfully completed the demo example.
              I appreciate your help (as I'm sure others do), especially in this 'initial' phase of learning new programs and new technologies.
              Your examples are extremely well thought out and easy to follow - unfortunately sometimes an error pops-up that stumps a 'newbie' like me and we need to call for your help!
              Best Regards
              Steve

              K 1 Reply Last reply 8 May 2024, 05:53 Reply Quote 0
              • K
                kl3m3n @SteveV
                last edited by 8 May 2024, 05:53

                @SteveV

                No problem! Thanks for the feedback 🙂

                If you have any more issues, feel free to ask!

                Best regards,
                Klemen

                1 Reply Last reply Reply Quote 0
                2 out of 7
                • First post
                  2/7
                  Last post