# Picarx python3: can't open file '/home/pi/picar-x/setup.py': \[Errno 2\] No such file or directory

**URL:** <https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015>\
**Category:** Robotic kit for Raspberry Pi\
**Created:** [September 25, 2026, 8:50pm UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015 "2026-09-25T20:50:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vince](https://forum.sunfounder.com/u/vince)\
**Post date:** [September 25, 2026, 8:50pm UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/1 "2026-09-25T20:50:46Z")

</div>

installing picar-x on a raspberry zero 2w, following updated instructions at [Install All the Modules (Important) — SunFounder PiCar-X Kit documentation](https://docs.sunfounder.com/projects/picar-x-v20/en/latest/python/install_all_modules.html) . Have re-installed pi “bookworm” as apparently your code does not support “trixie”. In the install process all worked until the following, git clone -b 2.1.x [GitHub - sunfounder/picar-x · GitHub](https://github.com/sunfounder/picar-x.git) --depth 1. Then cd 'ing into picar-x, and typing sudo pip3 install, doesn’t work. Tried sudo pip3 install --break-system-packages, but got ERROR: You must give at least one requirement to install (see “pip help install”).Also your web page shows this:

cd picar-x  
sudo pip3 install . --break

Please advise, the web site doesn’t make any sense

---

<div class="post-metadata">

**Author:** ![vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vince](https://forum.sunfounder.com/u/vince)\
**Post date:** [September 25, 2026, 8:58pm UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/2 "2026-09-25T20:58:53Z")

</div>

forget it, just read the README file in the picar directory and tried the sudo pip3 install . --break and it seemed to work

---

<div class="post-metadata">

**Author:** ![vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vince](https://forum.sunfounder.com/u/vince)\
**Post date:** [September 25, 2026, 9:06pm UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/3 "2026-09-25T21:06:34Z")

</div>

After completing all on the web page, tested by trying the 7.computer\_vision.py and got the following

vilib 0.3.19 launching …  
picamera2 0.3.31  
Traceback (most recent call last):  
File “/home/pi/picar-x/example/7.computer\_vision.py”, line 2, 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 30, in  
from picamera2.encoders import Encoder, H264Encoder, MJPEGEncoder, Quality  
File “/usr/lib/python3/dist-packages/picamera2/encoders/ **init**.py”, line 7, in  
from .encoder import Encoder, Quality  
File “/usr/lib/python3/dist-packages/picamera2/encoders/encoder.py”, line 13, in  
from ..request import \_MappedBuffer  
File “/usr/lib/python3/dist-packages/picamera2/request.py”, line 13, 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

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [September 29, 2026, 9:58am UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/4 "2026-09-29T09:58:00Z")

</div>

Thank you for the update, and for sharing the error details with us.

About the installation command  
You are right: from inside the ~/picar-x directory, the installation command is sudo pip3 install . --break-system-packages. The dot (.) means “install the project in the current directory.” Sorry that this was not clear in the instructions. Please make sure to write the flag in full — it is --break-system-packages, not just --break, otherwise it will error out.

About the new error (numpy / simplejpeg incompatibility)  
This is a separate issue. PiCar-X and Vilib are loading, but Python stops while importing simplejpeg, before the camera example starts. The message numpy.dtype size changed means the installed simplejpeg and the NumPy version Python is actually using are binary incompatible (a compile-time ABI mismatch).

To confirm which NumPy sudo python3 is actually loading, could you please run the following command and share its complete output?

sudo python3 -c “import numpy; print(‘NumPy version:’, numpy.version); print(‘NumPy path:’, numpy.file)”

To save a round trip, please also send us the output of these:

sudo python3 -c “import simplejpeg; print(simplejpeg.file)”  
sudo python3 -c “import picamera2; print(picamera2.file)”  
pip3 list | grep -iE “numpy|simplejpeg|picamera2”

This will tell us the source and version of NumPy, simplejpeg, and picamera2, so we can give you the appropriate fix.

Important: please hold off on uninstalling or upgrading NumPy until we see those results, so we don’t break the system’s picamera2 dependencies and make things harder to fix.

If convenient, you can also send the full command output or a screenshot (please upload screenshots to a cloud drive and set them to viewable by anyone).

---

<div class="post-metadata">

**Author:** ![vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vince](https://forum.sunfounder.com/u/vince)\
**Post date:** [September 29, 2026, 1:56pm UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/5 "2026-09-29T13:56:02Z")

</div>

Thanks for the response. I did keep a script of all the install, and looking back from inside the picar-x directory, I had done a “sudo pip3 install . --break”, without the “-break-system-packages”-. Note that at the time I took this from your web pages. The installation steps had already changed from an install the previous day where I recorded it was “sudo python3 setup.py install”. Bit difficult to keep up if the install steps keep changing … Anyways do you want me to rerun that ? Re-install ??

Continuing, here’s the outputs from the commands you requested:

$ sudo python3 -c “import numpy; print(‘NumPy version:’, numpy.version); print(‘NumPy path:’, numpy.file)”  
NumPy version: \<module ‘numpy.version’ from ‘/usr/local/lib/python3.11/dist-packages/numpy/version.py’\>  
Traceback (most recent call last):  
File “”, line 1, in  
File “/usr/local/lib/python3.11/dist-packages/numpy/ **init**.py”, line 792, in **getattr**  
raise AttributeError(f"module { **name**!r} has no attribute {attr!r}")  
AttributeError: module ‘numpy’ has no attribute ‘file’. Did you mean: ‘tile’?

$ sudo python3 -c “import simplejpeg; print(simplejpeg.file)”  
Traceback (most recent call last):  
File “”, line 1, in  
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

$ sudo python3 -c “import picamera2; print(picaamera2.file)”  
Traceback (most recent call last):  
File “”, line 1, in  
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 30, in  
from picamera2.encoders import Encoder, H264Encoder, MJPEGEncoder, Quality  
File “/usr/lib/python3/dist-packages/picamera2/encoders/ **init**.py”, line 7, in  
from .encoder import Encoder, Quality  
File “/usr/lib/python3/dist-packages/picamera2/encoders/encoder.py”, line 13, in  
from ..request import \_MappedBuffer  
File “/usr/lib/python3/dist-packages/picamera2/request.py”, line 13, 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

$ pip3 list | grep -iE “numpy|simplejpeg|picamera2”  
numpy 2.4.6  
picamera2 0.3.31  
simplejpeg 1.8.1

Thanks

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [September 30, 2026, 7:58am UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/6 "2026-09-30T07:58:24Z")

</div>

Thank you for providing the detailed test results.

Based on your latest logs, the main error is:

ValueError: numpy.dtype size changed, may indicate binary incompatibility.  
Expected 96 from C header, got 88 from PyObject  
This indicates a binary compatibility issue between NumPy and simplejpeg in the current Python environment. Since Picamera2 depends on simplejpeg, this issue can also prevent Picamera2 and Vilib from loading correctly.

At this point, it appears that Python packages installed through different methods are mixed in the system. Continuing to upgrade, downgrade, or reinstall individual dependencies may introduce additional version conflicts.

Therefore, rather than continuing to troubleshoot the current Python dependency environment, we recommend reinstalling Raspberry Pi OS to restore a clean system environment, and then following the latest PiCar-X online tutorial to install and configure the software again.

Before reinstalling the system, please make sure to back up any programs or files you would like to keep.

After reinstalling Raspberry Pi OS, we also recommend avoiding manually upgrading system-related packages such as NumPy, Picamera2, or simplejpeg with pip or sudo pip unless specifically instructed by the tutorial.

Once the PiCar-X installation is complete, please first test:

cd ~/picar-x/example  
python3 7.computer\_vision.py  
If the same issue still occurs on the clean system, please send us the complete installation steps and error output, and we will continue to investigate it with you.

Thank you for your patience and cooperation.

---

<div class="post-metadata">

**Author:** ![vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vince](https://forum.sunfounder.com/u/vince)\
**Post date:** [September 30, 2026, 5:49pm UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/7 "2026-09-30T17:49:40Z")

</div>

ok, re-installed the bookworm OS, updated etc the from your docs at [Install All the Modules (Important) — SunFounder PiCar-X Kit documentation](https://docs.sunfounder.com/projects/picar-x-v20/en/latest/python/install_all_modules.html)  
re-installed everything, but still the same result.  
COULD NOT enclose the output from the complete install, as it exceeded your character limits on what can be uploaded here, is there anyway to uplad a file ??  
Anyways, there were no discrepancies in the install, everything finished without any error and “Done”. The only failure was in the sound stuff

install sox …  
Reading package lists… 0%  
Reading package lists… 100%Reading package lists… Done  
Building dependency tree… 0%  
Building dependency tree… 0%Building dependency tree… 50%Building dependency tree… 50%Building dependency tree… 67%Building dependency tree… 96%Building dependency tree… Done  
Reading state information… 0%  
Reading state information… 0%Reading state information… Done  
sox is already the newest version (14.4.2+git20190427-3.5).  
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

check robothat 5 …  
find: : No such file or directory  
hat\_dir:  
No robothat 5 found  
robothat\_spk\_en: 20  
is\_with\_mic: false

But I don’t have a mic connected so assume that has nothing to do with it

Thanks

###############################

now running the 7.display example

~/picar-x/example  
sudo python3 ./7.computer\_vision.py

vilib 0.3.19 launching …  
picamera2 0.3.31  
Traceback (most recent call last):  
File “/home/pi/picar-x/example/./7.computer\_vision.py”, line 2, 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 30, in  
from picamera2.encoders import Encoder, H264Encoder, MJPEGEncoder, Quality  
File “/usr/lib/python3/dist-packages/picamera2/encoders/ **init**.py”, line 7, in  
from .encoder import Encoder, Quality  
File “/usr/lib/python3/dist-packages/picamera2/encoders/encoder.py”, line 13, in  
from ..request import \_MappedBuffer  
File “/usr/lib/python3/dist-packages/picamera2/request.py”, line 13, 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

---

<div class="post-metadata">

**Author:** ![vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vince](https://forum.sunfounder.com/u/vince)\
**Post date:** [September 30, 2026, 5:55pm UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/8 "2026-09-30T17:55:26Z")

</div>

This is a pi zero 2W,

cat /etc/os-release  
PRETTY\_NAME=“Debian GNU/Linux 12 (bookworm)”

I have another SD card with “trixie” installed, that works for all examples except for the android app, apparently there’s “wrong python versions inhibiting that”, that have been updated from bookworm to trixie. Thats why I’m trying to install all under trixie.

Happy holidays

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [October 2, 2026, 8:27am UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/9 "2026-10-02T08:27:53Z")

</div>

Thank you for your patience and for the detailed feedback.

Good news — we have successfully reproduced the issue you reported.

On a Raspberry Pi 3B+ running Debian 12 (Bookworm) 64-bit, following the tutorial steps, running 7.computer\_vision.py produced exactly the same error as yours:

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

After investigation, this is a version compatibility issue between the pip-installed NumPy and the system’s built-in simplejpeg, which prevents picamera2 / vilib from loading correctly. This is not caused by anything you did, so please rest assured.

We have forwarded the issue to our R&D team for further handling. Once we have a clear solution, we will update you as soon as possible.

Thank you again for your understanding and cooperation!

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [October 8, 2026, 6:19am UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/10 "2026-10-08T06:19:48Z")

</div>

The issue has been identified and resolved: there was a problem with the vilib module itself, which prevented the example programs from running properly.

Please remove and reinstall vilib with the following steps:

```auto
cd ~
sudo rm -rf vilib
git clone https://github.com/sunfounder/vilib.git --depth 1
cd vilib && sudo python3 install.py

```

Tip: Please keep your network stable during installation (a wired connection is recommended) and watch for any errors. If a step fails, simply run the install command again, and make sure all three modules — robot-hat, vilib, and picar-x — are installed successfully before running the examples.

---

<div class="post-metadata">

**Author:** ![vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vince](https://forum.sunfounder.com/u/vince)\
**Post date:** [October 8, 2026, 1:13pm UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/11 "2026-10-08T13:13:38Z")

</div>

By the looks of it, the git command you sent is being converted to some html stuff. Copying and pasting that into a command line fails immediately with a “fatal: Too many arguments.”  
Looking at the command it seems way off, and seems to be self converting to html code? the text “GitHub” should be the url, not a link to a url, the text “Vision library for python” shouldn’t be there, the “text . GitHub” again wrong, and that “dot” is not a dot signifying a period, but some whacky html code.  
so tried again with the original command which I can’t type here, as it also changes that to the incorrect one above !!, but its the **github clone “url address to sunfounder vilib” --depth 1** one.  
Ran the install.py stuff, and it all worked with no errors. Finally fired up the 7.vision display code and it all worked 🙂 So thank you to all who contributed.  
(the forum here is also converting the url text, here’s typing the url for the bbc, actually just https : www . bbc . com (without the spaces ) - [BBC News - Breaking news, video and the latest top stories from the U.S. and around the world](https://www.bbc.com/news) . just an FYI )

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [October 9, 2026, 7:56am UTC](https://forum.sunfounder.com/t/picarx-python3-cant-open-file-home-pi-picar-x-setup-py-errno-2-no-such-file-or-directory/5015/12 "2026-10-09T07:56:20Z")

</div>

Great to hear it’s all working now! 🎉

You nailed the cause — the earlier failure was because the forum auto-converted the URL in the command into an HTML link (“GitHub” became a hyperlink, the period was replaced with an HTML entity, etc.), so pasting it into the terminal split the command into multiple arguments and threw “fatal: Too many arguments”. Once you used the original correct clone command, vilib installed cleanly and the camera example ran fine.

Thanks also for the heads-up about the forum auto-converting URL text — we’ll pass that on to the relevant team.

Have fun, and feel free to reach out anytime if you need anything else!
