If you don't specify a pin factory, gpiozero will attempt to import each library it supports in turn, until it finds one that works. It attempts in this order:
For each failure, you'll see a
PinFactoryFallback warning. So if the first 3 failed and the 4th one succeeded, you'd see 3
PinFactoryFallback warnings and then it would proceed to run your code using the 4th (native).
This is what you got:
PinFactoryFallback: Falling back from rpigpio: This module can only be run on a Raspberry Pi!
This means that it attempted to import RPi.GPIO. The import succeeded but you got RPi.GPIO's error message
This module can only be run on a Raspberry Pi! This means that you have RPI.GPIO installed on your PC, which will never work. You can uninstall it. Next, gpiozero will have attempted to use pigpio, which didn't error meaning it's in use - it's presumably running your code now.
You can safely ignore the
PinFactoryFallback warning but you probably want to get rid of it. You can do this by setting the
GPIOZERO_PIN_FACTORY environment variable:
GPIOZERO_PIN_FACTORY=pigpio PIGPIO_ADDR=192.168.100.2 python3 testraspi.py
You ought to verify that this is working and selecting the pigpio pin factory by running the following script with the above environment variables:
from gpiozero import Device
If that shows something like:
<gpiozero.pins.pigpio.PiGPIOFactory object at 0x762c26b0>
Then you're good.
I'm a bit concerned about what you posted as your
ls -l result. You shouldn't have
pigpio.py in your local directory. Make sure you delete it and install pigpio with pip:
pip install pigpio