PiicoDev Install - RPi

Having fun playing with the PiicoDev modules, all working nicely.
Used Thonny on a PC connected to Pi Zero W via SSH and ran the tutorial scripts. Good good.

Developed code for the Environment Monitor V3 using Thonny but when I ran it in a Terminal Window it could not find the PiicoDev libraries.

Traced it to the install instruction for PiicoDev.
pip3 install piicodev Installs to ~/.local/lib/python3.9/site-packages
which Thonny is ok with and if installed from Thonny it uses the same folder.

When running from a Terminal Window, Python looks in :-

Running the install as sudo pip3 install piicodev the libraries install to the correct directory and the Python code ran from a Terminal window ok.

Just thought I would post this here for others who may have the same issue.
Also it may help if the GitHub instructions are updated.
It took me some time to find what was the problem.

But all good now and still having fun.


Hi Jim,

Thanks for the PSA, I’ll pass forward your heads up to the team that manages the GitHub instructions.
Thanks for documenting your fix for others that may find themself in a similar situation.

1 Like

Thanks for the feedback Jim :pray: I’ve updated the readme on our local source for the PyPI package, which is where I think you found the troublesome command.

The readme will get updated the next time we update the package.