I've encountered an import error while trying to use the periphery library for controlling LEDs in a Python script. Below is the error message I received:
Traceback (most recent call last):
File "/home/pico/github/epaper-with-raspberrypi/tmp/luckfox_led.py", line 1, in <module>
from periphery import LED
ImportError: cannot import name 'LED' from 'periphery' (/home/pico/github/epaper-with-raspberrypi/venv/lib/python3.10/site-packages/periphery/__init__.py)
Steps to Reproduce:
Create a Python script named luckfox_led.py with the following content:
from periphery import LED
# Additional code to manipulate LEDs
Run the script using Python 3.10 in a virtual environment: python luckfox_led.py.
Expected Behavior:
The script should import the LED class from the periphery module without any issues, allowing further LED manipulation commands to be executed.
Actual Behavior:
An ImportError is raised, indicating that the LED class cannot be imported from the periphery module.
Body:
Hello,
I've encountered an import error while trying to use the
periphery
library for controlling LEDs in a Python script. Below is the error message I received:Steps to Reproduce:
luckfox_led.py
with the following content:python luckfox_led.py
.Expected Behavior:
The script should import the
LED
class from theperiphery
module without any issues, allowing further LED manipulation commands to be executed.Actual Behavior:
An ImportError is raised, indicating that the
LED
class cannot be imported from theperiphery
module.Environment:
Any insights or solutions to resolve this import issue would be greatly appreciated. Thank you!