Hello,
I’m dabbling with this Python module:
The only way I can get pip to install it on the Le Potato /w headless Raspbian is with this command:
pip3 install --break-system-packages adafruit-circuitpython-bno055
I would create a virtual python environment and use that instead, but I can’t figure out how to add the correct gpiod
module into the virtual environment. This is the one that is already pre-installed in the Raspbian image.
I’ve tried making a virtual environment as such:
python3 -m venv tankbot
source tankbot/bin/activate
pip3 install gpiod
But, this is not the right gpiod. I have scripts that work with the pre-installed gpiod module. But when I activate this python virtual environment, I get errors.
from gpiod import Chip, LINE_REQ_DIR_OUT, LINE_REQ_DIR_IN
ImportError: cannot import name 'LINE_REQ_DIR_OUT' from 'gpiod' (/root/tankbot/lib/python3.11/site-packages/gpiod/__init__.py)
- What’s the right way to install python modules?
- How do I install the the correct gpiod module into a python virtual environment? “The correct gpiod” being the problem, not the creation of the virtual environment.