HELP...How to set up YOLO Computer Vision on a Raspberry Pi

Setting up Picamera2

“First, let’s check what version of NumPy PiCamera2 is using. Open up a new terminal window (don’t close the old one), and punch in the following:

python3 -c “import numpy; print(numpy._version_)”

This gives:

2.4.2

“This will print out a version number. Get that version number and enter it with the following command, which will tell Conda to downgrade to this compatible version:”

Is this:

(ultralytics-env) pi@pi:~ $

or

(base) pi@pi:~ $

?

And…should this be:

conda install numpy=1.24.2

or

conda install numpy=2.4.2

This gives:

ValueError: numpy.dtype size changed

1 Like

Hey there, @Bill293536,

That will just be the standard environment you get when you open up a Pi terminal.

Ultralytics uses a more advanced version of numpy, you need to downgrade it to the type used by the Raspberry Pi in order to use the Picamera module without dependency issues.

So you’re clarifying the standard Pi environment’s numpy version.

Then in the Ultralytics-env:

conda install numpy = <your numpy version>

Hi Jane,

2.4.2

I do that, and I get the result:

ValueError: numpy.dtype size changed, may indicate binary incompatibility…

Bill

1 Like

Hey @Bill293536,

Picamera 2 is built upon an older version of numpy, but Ultralytics calls for a newer version. The steps in our Conda Installation Guide were very particular so that this conflict is resolved.

2 Likes

Thank you.

(ultralytics-env) pi@pi:~$conda install numpy=1.24.2

2 Likes