Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5409

Python • Re: gpio.setup() on raspberry pi5

$
0
0
If we are using Bookworm (64-bit) with Desktop…
If we create a venv with system packages like this:

Code:

mkdir my_projectcd my_projectpython -m venv --system-site-packages envsource env/bin/activate
Then we see RPi.GPIO is already present:

Code:

(env) pi@pibk64:~/my_project $ pip install RPi.GPIOLooking in indexes: https://pypi.org/simple, https://www.piwheels.org/simpleRequirement already satisfied: RPi.GPIO in /usr/lib/python3/dist-packages (0.7.1a4)
If we create a venv without system packages, pip install RPi.GPIO will still work, but gives a warning about
"DEPRECATION: RPi.GPIO is being installed using the legacy 'setup.py install' method"

Statistics: Posted by neilgl — Sun Dec 17, 2023 10:13 pm



Viewing all articles
Browse latest Browse all 5409

Trending Articles