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

Beginners • Re: 6 weeks and out of time

$
0
0
activate your venv
then type python
you are now in the Python REPL/Terminal, and you can use python commands
type
import RPi.GPIO
it should fail
try
import lgpio
it should also fail


Exit your venv
go to your venv folder, edit pyvenv.cfg
It should be obvious once in there what to set to true. [ set include-system-site-packages = true ]
save and reactivate, start python, test the imports.
It should work.

I just tested here to make sure.

I mention lgpio as it may be a good time to try and move over to it. BUT get RPi.GPIO working first.

Statistics: Posted by bensimmo — Sun Dec 22, 2024 7:27 pm



Viewing all articles
Browse latest Browse all 5162

Trending Articles