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

Python • Libraries absent in Virtual environment

$
0
0
So I have a simple code

Code:

import gpiozerorelay=gpiozero.OutputDevice(17)
When I run this outside of the virtual environment it works fine. When I run it inside the virtual environment I get the following warnings

/home/rocketpi/rocket/lib/python3.11/site-packages/gpiozero/devices.py:300: PinFactoryFallback: Falling back from lgpio: No module named 'lgpio'
warnings.warn(

does this mean a module is present on the main raspberry pi installation but not in the venv. Wasnt the requirement of VENV supposed to make things better? Is there a way to fix this error? Do I have to somehow install all these modules inside the venv?

Statistics: Posted by Crimson0087 — Fri Oct 11, 2024 3:54 pm



Viewing all articles
Browse latest Browse all 1251

Trending Articles