I am running Bookworm on raspberry pi 4. When I run pip list for system-wide packages is see lgpio ver 0.2.2.0.
pi@desktop-pi:~ $ pip list | grep lgpio
lgpio 0.2.2.0
pi@desktop-pi:~ $
I then created a virtual environment called test3 and installed RPi.GPIO and gpiozero.
lgpio didn't get installed. So I ran pip install lgpio and got a different version
(test3) pi@desktop-pi:~ $ pip install lgpio
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting lgpio
Using cached https://www.piwheels.org/simple/lgpio/l ... ne-any.whl (2.5 kB)
Installing collected packages: lgpio
Successfully installed lgpio-0.0.0.2
(test3) pi@desktop-pi:~ $ pip list
Package Version
---------- -------
colorzero 2.0
gpiozero 2.0
lgpio 0.0.0.2
pip 23.0.1
RPi.GPIO 0.7.1
setuptools 66.1.1
wheel 0.38.4
(test3) pi@desktop-pi:~ $
When I use gpiozero to define a button, I get this warning
(test3) pi@desktop-pi:~ $ python
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gpiozero import Button
>>> btn = Button(21)
/home/pi/.virtualenvs/test3/lib/python3.11/site-packages/gpiozero/devices.py:295: PinFactoryFallback: Falling back from lgpio: module 'lgpio' has no attribute 'SET_BIAS_DISABLE'
warnings.warn(
>>>
When I look at devices.py, it is blank.
Why is lgpio in the virtual environment a different version than in the site wide environment? Any ideas?
Thanks
pi@desktop-pi:~ $ pip list | grep lgpio
lgpio 0.2.2.0
pi@desktop-pi:~ $
I then created a virtual environment called test3 and installed RPi.GPIO and gpiozero.
lgpio didn't get installed. So I ran pip install lgpio and got a different version
(test3) pi@desktop-pi:~ $ pip install lgpio
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting lgpio
Using cached https://www.piwheels.org/simple/lgpio/l ... ne-any.whl (2.5 kB)
Installing collected packages: lgpio
Successfully installed lgpio-0.0.0.2
(test3) pi@desktop-pi:~ $ pip list
Package Version
---------- -------
colorzero 2.0
gpiozero 2.0
lgpio 0.0.0.2
pip 23.0.1
RPi.GPIO 0.7.1
setuptools 66.1.1
wheel 0.38.4
(test3) pi@desktop-pi:~ $
When I use gpiozero to define a button, I get this warning
(test3) pi@desktop-pi:~ $ python
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gpiozero import Button
>>> btn = Button(21)
/home/pi/.virtualenvs/test3/lib/python3.11/site-packages/gpiozero/devices.py:295: PinFactoryFallback: Falling back from lgpio: module 'lgpio' has no attribute 'SET_BIAS_DISABLE'
warnings.warn(
>>>
When I look at devices.py, it is blank.
Why is lgpio in the virtual environment a different version than in the site wide environment? Any ideas?
Thanks
Statistics: Posted by gldrplt — Sun Jan 21, 2024 4:27 pm