OK3568 4.19.206 Buildroot Adding the Python3 - pip Installation Package

Document classification: □ Top secret □ Secret □ Internal information ■ Open

Revision History

Date

Version

Revision History

01/23/2025

V1.0

Initial Version

Adding the Python3 - pip Installation Package

This manual describes how to add python3-pip to a buildroot system.

Modification Method

Modify Configuration File: buildroot/package/Config.in

Add pyhon-pip/Config.in

Image

Unzip the python-pip archive of the attachment in the buildroot/package directory

python-pip-20240425100624-9049ncj.zip

Modify the defconfig file used by buildroot

Execute make menuconfig in the buildroot/output/OK3568 directory to select python3 and python-pip

Image

Image

After modification, save the modified.config file to buildroot/configs/OK3568 _ defconfig

After saving, you can compile the whole package. When compiling, you can see that the download, compilation and installation of pip related packages are successful.

Image

Flash the compiled file system to the development board to use the pip command.

Potential Compilation Errors

Error During Compilation:

Image

Solution:
Solution: Re-link the symbolic link for OK3568-linux-source/buildroot/output/OK3568/host/bin/python to point to python3.

cd buildroot/output/OK3568/host/bin
rm python
ln -s python3 python

After re-establishing the link, recompile. After successful linking, the result of ls -l python should be as shown.

Image

SSL Error when running pip install on the board after flashing:

Image

Solution:
Delete the Python-related files in the OK3568-linux-source/buildroot/output/OK3568/build/ directory and recompile. Installing pip depends on SSL. If a full compilation was previously completed during the first issue, it was done using python2 for SSL compilation.

rm buildroot/output/OK3568/build/python-* -rf
./build.sh buildroot

Once the compilation is complete, flash the new build to the board and verify its functionality. You can then proceed to test by installing opencv-python.

Image

If you encounter an error about the pip package download failing, place the specified package files into the buildroot/dl/ directory.

pip-21.2.4.tar.gz