# Picar-X Can't install picar-x module.,

**URL:** <https://forum.sunfounder.com/t/picar-x-cant-install-picar-x-module/1991>\
**Category:** General\
**Created:** [November 19, 2024, 11:01pm UTC](https://forum.sunfounder.com/t/picar-x-cant-install-picar-x-module/1991 "2024-11-19T23:01:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@simon](https://forum.sunfounder.com/u/simon)\
**Post date:** [November 19, 2024, 11:01pm UTC](https://forum.sunfounder.com/t/picar-x-cant-install-picar-x-module/1991/1 "2024-11-19T23:01:07Z")

</div>

Trying to build the picar-x module but running into the following:

_TypeError: expected string or bytes-like object, got ‘NoneType’_

Installed Raspberry Pi using the recommend image and got:

Linux pibot 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux

Following the instructions from:  
[https://docs.sunfounder.com/projects/picar-x/en/latest/python/python\_start/install\_all\_modules.html](https://docs.sunfounder.com/projects/picar-x/en/latest/python/python_start/install_all_modules.html)

Full output below.

> user@pibot:~/picar-x $ !18  
> sudo python3 setup.py install  
> Traceback (most recent call last):  
> File “/home/user/picar-x/setup.py”, line 17, in   
> setup(  
> File “/usr/lib/python3/dist-packages/setuptools/ **init**.py”, line 107, in setup  
> \_install\_setup\_requires(attrs)  
> File “/usr/lib/python3/dist-packages/setuptools/ **init**.py”, line 75, in \_install\_setup\_requires  
> dist = MinimalDistribution(attrs)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3/dist-packages/setuptools/ **init**.py”, line 57, in **init**  
> super(). **init** (filtered)  
> File “/usr/lib/python3/dist-packages/setuptools/dist.py”, line 473, in **init**  
> for ep in metadata.entry\_points(group=‘distutils.setup\_keywords’):  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 1040, in entry\_points  
> return SelectableGroups.load(eps).select(\*\*params)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 476, in load  
> ordered = sorted(eps, key=by\_group)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 1037, in   
> eps = itertools.chain.from\_iterable(  
> ^  
> File “/usr/lib/python3.11/importlib/metadata/\_itertools.py”, line 16, in unique\_everseen  
> k = key(element)  
> ^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 954, in \_normalized\_name  
> or super()._normalized\_name  
> ^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 627, in normalized\_name  
> return Prepared.normalize(self.name)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 882, in normalize  
> return re.sub(r"[-.]+", “-”, name).lower().replace(‘-’, '_')  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/re/ **init**.py”, line 185, in sub  
> return \_compile(pattern, flags).sub(repl, string, count)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> TypeError: expected string or bytes-like object, got ‘NoneType’  
> user@pibot:~/picar-x $

---

<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:** [November 20, 2024, 3:18am UTC](https://forum.sunfounder.com/t/picar-x-cant-install-picar-x-module/1991/2 "2024-11-20T03:18:09Z")

</div>

Did you follow the installation tutorial steps to install all the library codes? The installation must be done in order.

First, install the `robot-hat` library:

cd ~/  
git clone -b v2.0 [GitHub - sunfounder/robot-hat: Robot Hat python library](https://github.com/sunfounder/robot-hat.git)  
cd robot-hat  
sudo python3 setup.py install

Next, install `vilib`:

cd ~/  
git clone -b picamera2 [GitHub - sunfounder/vilib: Vision library for python](https://github.com/sunfounder/vilib.git)  
cd vilib  
sudo python3 install.py

Finally, install `picar-x`:

cd ~/  
git clone -b v2.0 [GitHub - sunfounder/picar-x](https://github.com/sunfounder/picar-x.git)  
cd picar-x  
sudo python3 setup.py install

And run `i2samp.sh`:

cd ~/picar-x  
sudo bash i2samp.sh

Make sure that each library is installed successfully before moving on to the next one. If you encounter any errors during the installation process, please provide us with screenshots of the error messages.

---

<div class="post-metadata">

**Author:** ![simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@simon](https://forum.sunfounder.com/u/simon)\
**Post date:** [November 20, 2024, 4:01pm UTC](https://forum.sunfounder.com/t/picar-x-cant-install-picar-x-module/1991/3 "2024-11-20T16:01:54Z")

</div>

Hi. Yes I installed all module in the same order they were documented in on that page, and had this issue when we got to the picar -x module.

I guess I can try working through the module install again from top to bottom just in case something got missed, Will do that and see if it resolves the issue.

---

<div class="post-metadata">

**Author:** ![simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@simon](https://forum.sunfounder.com/u/simon)\
**Post date:** [November 20, 2024, 4:27pm UTC](https://forum.sunfounder.com/t/picar-x-cant-install-picar-x-module/1991/4 "2024-11-20T16:27:35Z")

</div>

> [@simon](#):
>
> [Install All the Modules(Important) — SunFounder picar-x documentation](https://docs.sunfounder.com/projects/picar-x/en/latest/python/python_start/install_all_modules.html)

I tried reinstall the modules as suggested. So I started with the robothat module but immediately get the same error now with this too. See output below.

I guess the next suggestion will be to blow away the current system and start over?

> user@pibot:~ $ sudo rm -rf robot-hat/  
> user@pibot:~ $ git clone -b v2.0 [GitHub - sunfounder/robot-hat: Robot Hat python library](https://github.com/sunfounder/robot-hat.git)  
> Cloning into ‘robot-hat’…  
> remote: Enumerating objects: 1775, done.  
> remote: Counting objects: 100% (434/434), done.  
> remote: Compressing objects: 100% (180/180), done.  
> remote: Total 1775 (delta 281), reused 344 (delta 239), pack-reused 1341 (from 1)  
> Receiving objects: 100% (1775/1775), 19.68 MiB | 11.50 MiB/s, done.  
> Resolving deltas: 100% (1095/1095), done.  
> user@pibot:~ $ cd robot-hat/  
> user@pibot:~/robot-hat $ sudo python3 setup.py install  
> Traceback (most recent call last):  
> File “/home/user/robot-hat/setup.py”, line 31, in   
> setup(  
> File “/usr/lib/python3/dist-packages/setuptools/ **init**.py”, line 107, in setup  
> \_install\_setup\_requires(attrs)  
> File “/usr/lib/python3/dist-packages/setuptools/ **init**.py”, line 75, in \_install\_setup\_requires  
> dist = MinimalDistribution(attrs)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3/dist-packages/setuptools/ **init**.py”, line 57, in **init**  
> super(). **init** (filtered)  
> File “/usr/lib/python3/dist-packages/setuptools/dist.py”, line 473, in **init**  
> for ep in metadata.entry\_points(group=‘distutils.setup\_keywords’):  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 1040, in entry\_points  
> return SelectableGroups.load(eps).select(\*\*params)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 476, in load  
> ordered = sorted(eps, key=by\_group)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 1037, in   
> eps = itertools.chain.from\_iterable(  
> ^  
> File “/usr/lib/python3.11/importlib/metadata/\_itertools.py”, line 16, in unique\_everseen  
> k = key(element)  
> ^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 954, in \_normalized\_name  
> or super()._normalized\_name  
> ^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 627, in normalized\_name  
> return Prepared.normalize(self.name)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/importlib/metadata/ **init**.py”, line 882, in normalize  
> return re.sub(r"[-.]+", “-”, name).lower().replace(‘-’, '_')  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/lib/python3.11/re/ **init**.py”, line 185, in sub  
> return \_compile(pattern, flags).sub(repl, string, count)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> TypeError: expected string or bytes-like object, got ‘NoneType’

---

<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:** [November 21, 2024, 2:41am UTC](https://forum.sunfounder.com/t/picar-x-cant-install-picar-x-module/1991/6 "2024-11-21T02:41:18Z")

</div>

What system are you currently using, and what is the version of the system?  
Yes, we suggest that you reinstall the Raspberry Pi OS and then reinstall all the library code.  
Remember, do not change the character encoding of the system; it must use the standard encoding (UTF-8).

---

<div class="post-metadata">

**Author:** ![simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@simon](https://forum.sunfounder.com/u/simon)\
**Post date:** [November 21, 2024, 8:26pm UTC](https://forum.sunfounder.com/t/picar-x-cant-install-picar-x-module/1991/7 "2024-11-21T20:26:55Z")

</div>

Not sure exactly what details you need, but I collected what is below which I think is probably what you’re looking for. If not let me know what other details may be needed.

As far as the character encoding is concerned no changes were made to it. All the directions for the kit were followed exactly as prescribed.

Thanks for the help thus far!

Note I blanked out the links from the os-release output due to the forum software complaining this message had too many links in it.

> user@pibot:/etc $ cat /sys/firmware/devicetree/base/model; echo  
> Raspberry Pi 3 Model B Plus Rev 1.4  
> user@pibot:/etc $ cat /etc/os-release  
> PRETTY\_NAME=“Debian GNU/Linux 12 (bookworm)”  
> NAME=“Debian GNU/Linux”  
> VERSION\_ID=“12”  
> VERSION=“12 (bookworm)”  
> VERSION\_CODENAME=bookworm  
> ID=debian  
> HOME\_URL=“”  
> SUPPORT\_URL=“”  
> BUG\_REPORT\_URL=“”  
> user@pibot:/etc $ uname -a  
> Linux piebot 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux  
> user@pibot:/etc $

---

<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:** [November 22, 2024, 1:48am UTC](https://forum.sunfounder.com/t/picar-x-cant-install-picar-x-module/1991/8 "2024-11-22T01:48:53Z")

</div>

Please reinstall the Raspberry Pi operating system and then download and install all the necessary libraries for PiCar-X. Share screenshots of the installation process with us so that we can assist you in analyzing and resolving the issue.

You can refer to the installation instructions here:[5. Install All the Modules(Important) — SunFounder PiCar-X Kit documentation](https://docs.sunfounder.com/projects/picar-x-v20/en/latest/python/python_start/install_all_modules.html)
