******pidog@*****piDog:~/vilib $ sudo pip3 install . --break-system-packages
Looking in indexes: Simple index , piwheels - Simple index
Processing /home/tandfpidog/vilib
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Building wheels for collected packages: vilib
Building wheel for vilib (pyproject.toml) … done
Created wheel for vilib: filename=vilib-0.3.18-py3-none-any.whl size=33204 sha256=d905d38cc175d84bcb0d665
a7f712b013f34b0415c48042068b5c700d5dab43d
Stored in directory: /tmp/pip-ephem-wheel-cache-j0xjlvsr/wheels/3a/13/4e/340aa56b2bb0fb28e1eb5418d5b9a563
10a3e645462db31973
Successfully built vilib
Installing collected packages: vilib
Attempting uninstall: vilib
Found existing installation: vilib 0.3.18
Uninstalling vilib-0.3.18:
Successfully uninstalled vilib-0.3.18
Successfully installed vilib-0.3.18
WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the
system package manager, possibly rendering your system unusable. It is recommended to use a virtual enviro
nment instead: 12. Virtual Environments and Packages — Python 3.14.3 documentation . Use the --root-user-action option if you know what you ar
e doing and want to suppress this warning.
AFAIK, You should not be using pip3 to install vilib. It should be….
cd /home/pi/
git clone GitHub - sunfounder/vilib: Vision library for python
cd vilib
sudo python3 install.py
The combination of “sudo“ and --break-system-packages may have resulted in a broken system, hence the error messages, difficult to be sure.
thank you for your answer.
But
sudo python3 install.py
causes many errors and/or hangs.
I read a fix from the Sunfounder moderator that suggested
sudo pip3 install . –break-system-packages
I’m out of my depth a bit here ![]()
further info:- previously I installed all of the necessary modules, but then lost WiFi access. I ended up reformating the microSD card, installing the OS again, then ran into these problems while loading the piDog modules!!
OK, I did not realise you were in a prior chat with a moderator, there’s probably some background here of which I am unaware, so go with the moderator.
In general…
apt is a robust way to install packages, it manages them very well and shouldn’t break anything
pip can be a bad way to install python packages, in that it can overwrite system python. In fact, it did break many installations in the past. So, it is now only recommended to be used inside a virtual environment, or venv, isolating it from the system python.
If one knows for 100% certain that there is no pip/system conflict, then --break-system-packages can be used outside of a virtual environment.
Some of sunfounder install.py scripts do contain the break flag, but they have fully verified if this is safe or not.
Maybe nothing is broken, id suggest continuing and seeing if all is OK. Or post the full errors that you get when trying the python3 install.py, someone may be able to help.
Addendum, if you really need to install a python package xxxxxx outside a venv in future, always check if there is an apt python3-xxxxxx equivalent first. It’s safer.
Thanks again, but before you go I’d appreciate your further opinion.
firstly the moderator suggestion was made with regards to someone else’s (similar) problem, not directly responding to my issues.
I have had a thought which I may try tomorrow morning - what do you think ?
Although I reformatted microSD and basically started again. I had left the battery connected (switch off though). Could there be some volatile memory on the HAT that was retained by the battery that is effecting the successful reloading of the piDog modules ? I’ll disconnect the battery tomorrow and try again
No, I’m not aware of any data retention in the hat.
I dont see, and that’s probably the Malbec by now
, anything in your posts describing which sunfounder product you are using, nor which rpi you have, nor which OS and version you are using. That may or not ultimately be helpful but, it could at least constrain the problem.
I know you’ve already done this before, but I would honestly suggest starting again. Run each step in the sunfounder installation for whichever os/product you have and post ANY warning or errors you get at any stage before proceeding to the next one. It’s really easy to miss a critical message or miss a step.
I understand that sunfounder are on vacation until 23rd, but often a moderator will help out during these periods and may have more sensible suggestions than I.