• RPi4B - Raspbian Buster Python3 GPIO error

    From Hans-Werner Kneitinger@3:770/3 to All on Friday, December 30, 2022 12:20:57
    Moin,
    Using an RPi4B with Raspbian Buster and Python 3.

    apt install python3-gpio
    apt install python3-pip
    pip3 install gpiozero


    : python3
    Python 3.7.3 (default, Oct 31 2022, 14:04:00)
    [GCC 8.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.

    import RPi.GPIO as GPIO
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 23,
    in <module>
    from RPi._GPIO import *
    RuntimeError: This module can only be run on a Raspberry Pi!

    <CTRL-D>

    apt policy python3-rpi.gpio
    python3-rpi.gpio:
    Installiert: 0.6.5-1
    Installationskandidat: 0.6.5-1
    Versionstabelle:
    *** 0.6.5-1 500
    500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
    100 /var/lib/dpkg/status


    Whats going on, whats wrong can someone help, please?

    Happy new year.

    --
    cu
    hawe

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Hans-Werner Kneitinger@3:770/3 to All on Friday, December 30, 2022 13:00:02
    Am 30.12.22 um 12:52 schrieb A. Dumas:
    Hans-Werner Kneitinger <hans-werner.kneitinger@gmx.de> wrote:
    Using an RPi4B with Raspbian Buster

    Why?
    Because this Pi is running My Home Automation and Buster is marked as LTE. Never change a running system ;-)



    Whats going on, whats wrong can someone help, please?

    No longer supported OS, probably, and new developments making old stuff

    incompatible. Also, rpi.gpio is not gpiozero. See https://gpiozero.readthedocs.io/en/stable/migrating_from_rpigpio.html

    I know, but during searching internet, some hints are to install gpiozero.

    --
    cu
    hawe

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Hans-Werner Kneitinger on Friday, December 30, 2022 11:52:59
    Hans-Werner Kneitinger <hans-werner.kneitinger@gmx.de> wrote:
    Using an RPi4B with Raspbian Buster

    Why?

    Whats going on, whats wrong can someone help, please?

    No longer supported OS, probably, and new developments making old stuff incompatible. Also, rpi.gpio is not gpiozero. See https://gpiozero.readthedocs.io/en/stable/migrating_from_rpigpio.html

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Hans-Werner Kneitinger on Friday, December 30, 2022 13:12:52
    Hans-Werner Kneitinger <hans-werner.kneitinger@gmx.de> wrote:
    Am 30.12.22 um 12:52 schrieb A. Dumas:
    Hans-Werner Kneitinger <hans-werner.kneitinger@gmx.de> wrote:
    Using an RPi4B with Raspbian Buster

    Why?
    Because this Pi is running My Home Automation and Buster is marked as LTE. Never change a running system ;-)

    Debian perhaps, but Raspberry Pi OS abandons old versions quickly.

    I know, but during searching internet, some hints are to install gpiozero.

    All hints should say that. Switch now or be left behind. Main thing however
    is to install a new OS on a fresh SD card or disk and try out that. I
    repeat: Raspberry Pi OS is not Debian!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Hans-Werner Kneitinger@3:770/3 to All on Friday, December 30, 2022 19:34:25
    Am 30.12.22 um 12:20 schrieb Hans-Werner Kneitinger:

    have to use pip3 install RPi.GPIO==0.7.1

    happy new year everyone

    Moin,
    Using an RPi4B with Raspbian Buster and Python 3.

    apt install python3-gpio
    apt install python3-pip
    pip3 install gpiozero


    : python3
    Python 3.7.3 (default, Oct 31 2022, 14:04:00)
    [GCC 8.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.

    import RPi.GPIO as GPIO
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 23,
    in <module>
        from RPi._GPIO import *
    RuntimeError: This module can only be run on a Raspberry Pi!

    <CTRL-D>

    apt policy python3-rpi.gpio
    python3-rpi.gpio:
      Installiert:           0.6.5-1
      Installationskandidat: 0.6.5-1
      Versionstabelle:
     *** 0.6.5-1 500
            500 http://raspbian.raspberrypi.org/raspbian buster/main armhf
    Packages
            100 /var/lib/dpkg/status


    Whats going on, whats wrong can someone help, please?

    Happy new year.


    --
    cu
    hawe

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)