If we are using Bookworm (64-bit) with Desktop…
If we create a venv with system packages like this:Then we see RPi.GPIO is already present: 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"
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
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)
"DEPRECATION: RPi.GPIO is being installed using the legacy 'setup.py install' method"
Statistics: Posted by neilgl — Sun Dec 17, 2023 10:13 pm