I have two Raspberry ZeroW , and I try to use both for to get temperature data. I am recording this data in order to find out when the temperature changes. Both devices should be able to execute the same script. Both have the same hardware setup and they record data on a USB stick.
Kind of weary that on the second device executing the python script fails : I get the error :
No module named ‘board’
That s odd because I am sure the board has been installed.
This is a known issue :
I tried to follow the widely published troubleshooting (reinstalling Blank etc) with no success.
For instance :
pip3 install adafruit-circuitpython-dht
does not work !
The error message ( error: externally-managed-environment ) is followed by a hint which indeed leads me to the solution :
“This environment is externally managed ╰─> To install Python packages system-wide, try apt install … “
The only way to get this issue fixed is installing a virtual environment :
That means :
python3 -m venv ./ws-env
source ws-env/bin/activate
(ws-env) user@raspberrypi:/home/pluto# pip3 install board
(ws-env) user@raspberrypi:/home/pluto# pip3 install adafruit-circuitpython-dht
It works like a charm !