ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

I am following the instructions in section: “AI Interaction Using GPT-40”
In sub-section: “4. Running the example”, ‘Text Communication’, I ran the following commands:

cd ~/picar-x/gpt_examples/
sudo ~/my_venv/bin/python3 gpt_car.py --keyboard

and I received the following error on the screen:
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
(full error below)

pinctrl set 20 op dh
vilib 0.3.14 launching …
picamera2 0.3.25
Traceback (most recent call last):
File “/home/Nico/picar-x/gpt_examples/gpt_car.py”, line 70, in
from vilib import Vilib
File “/usr/local/lib/python3.11/dist-packages/vilib/init.py”, line 2, in
from .vilib import Vilib
File “/usr/local/lib/python3.11/dist-packages/vilib/vilib.py”, line 18, in
from picamera2 import Picamera2
File “/usr/lib/python3/dist-packages/picamera2/init.py”, line 11, in
from .picamera2 import Picamera2, Preview
File “/usr/lib/python3/dist-packages/picamera2/picamera2.py”, line 27, in
from picamera2.encoders import Encoder, H264Encoder, MJPEGEncoder, Quality
File “/usr/lib/python3/dist-packages/picamera2/encoders/init.py”, line 6, in
from .jpeg_encoder import JpegEncoder
File “/usr/lib/python3/dist-packages/picamera2/encoders/jpeg_encoder.py”, line 3, in
import simplejpeg
File “/usr/lib/python3/dist-packages/simplejpeg/init.py”, line 1, in
from ._jpeg import encode_jpeg, encode_jpeg_yuv_planes
File “simplejpeg/_jpeg.pyx”, line 1, in init simplejpeg._jpeg
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Any ideas how to fix it?
Thanks
Nick

We recommend the following steps:

  1. Update the Code: Ensure that your codebase is up to date with the latest version.
  2. Reinstall the System: If the issue persists, consider reinstalling the system and then reinstalling all the necessary libraries and code.

After completing these steps, please check if the issue is resolved. If the problem continues, feel free to share more details with us, and we’ll be happy to assist further.

The solution worked, thanks