I recently made a project using opencv 4 on my raspberry pi 3 b+, but then decided to port the whole project to a new raspberry pi zero, as I want to make it a permanent setup and want to keep my py 3 for future projects. So basically it's just a python script running in a pithon3 virtual environment where I installed opencv. So on the pi 3 it works perfectly fine. I installed opencv on the pi zero the same way as on the pi 3 before. Downloading the source from Github and compiling it inside the virtual environment using cmake and make. Both cmake and make finished without any errors.

Now the problem: when I enter a python command line (of course inside the virtual environment) and then type "import cv2" and hit enter, the pi works for a few seconds and then jumps out of the python command line into regular command line with the error: unrecognized machine command without any further information. Now I am very confused, because I thought when there was a problem translating any of the c++ code from opecv into machine code for the pi, the compiler should throw an error and usually a compiler should never produce machine code that is not working. So my question is, of course how can this happen and what can I do to get opencv running on the pi zero anyways?

Just before someone asks: yes of course I ran apt-get update and apt-get upgrade before doing any of this. And I read somewhere on a forum that other people have made opencv projects on a pi zero before, so it cant be a problem of the raspberry.

  • Is there really no person in this community that can help me with this? I tried recompiling multiple times already... – XPModder Apr 26 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.