OpenCV for GoPiGo3

@rick.torzynski, thanks for venturing into the great virtual (env) unknown. I am not that courageous, so I am planning to install non virtual with a backup of my card prior to the installation.

I have been using OpenCV 2.4.9 on a desktop RaspberryPi for some time, but am planning to take whatever: “sudo pip install opencv-contrib-python” will install.

(Trying to shrink my 16GB backup so I can verify it with a 15.9GB card at the moment.)

Looking forward to hearing about your success,

Alan (otherwise known as CyclicalObsessive)

Alan,

Thanks for the message - I was successful in getting GoPiGo3 to run in the virtualenv. I just had to set PYTHONPATH in the virtual environment.

$ export PYTHONPATH=/home/pi/.local/lib/python3.5/site-packages/

and then run the update script:

$ curl -kL dexterindustries.com/update_gopigo3 | bash -s -- --user-local --bypass-gui-installation

from the /home/pi/Dexter folder

So I have successfully compiled and installed OpenCV 4.0.0 on my GoPiGo3 - now to have some fun with Face/Object detection and self-driving. I also have a Google Coral TPU USB Accelerator stick to use…

Regards,
Rick

2 Likes

I followed your steps but for some reason, it is not working.

I opened my virtual env with workon cv then did the export with the correct version of my pyhton and then went to the dexter directory and ran the command but got an error. See the attached.