I believe the issue is "Externally Managed Packages" / "Python Virtual Environment", rather than a more traditionally known Virtual Environment.Because your virtual environment isn't real. Therefore it doesn't have any GPIO pins.
It's more about where Python looks for packages, which version it finds and uses, rather than not having access to GPIO. Looks to me like there's a version of 'gpiozero' installed which doesn't support 'libgpiod' - I would guess the OP is using a Pi 5 or Bookworm.
Statistics: Posted by hippy — Sun Mar 10, 2024 8:41 pm