Guide to Adding Python3-pip Package in OK3568 Buildroot

Posted by Andy L.
6
Sep 5, 2024
65 Views

OK3568 4.19.232 buildroot adds python3-pip installation package.

1. Modify buildroot/package/Config.in to add python-pip/Config.in.

Guide to Adding Python3-pip Package in OK3568 Buildroot

2. Download python-pip and extract the compressed package to the buildroot/package directory.

Guide to Adding Python3-pip Package in OK3568 Buildroot

3. Modify the defconfig file used by buildroot. Execute make menuconfig in the buildroot/output/OK3568 directory to select python3 and python-pip.

Guide to Adding Python3-pip Package in OK3568 Buildroot

Guide to Adding Python3-pip Package in OK3568 Buildroot

After modification, save the modified .config file to buildroot/configs/OK3568_defconfig. Then, perform a full compilation. During the compilation, the downloading, compilation, and installation of pip-related packages will be visible, indicating success.

Guide to Adding Python3-pip Package in OK3568 Buildroot

Burn the compiled file system to the development board to enable pip commands.

4. Possible compilation errors and solutions:

a. Possible compilation errors and solutions:

Guide to Adding Python3-pip Package in OK3568 Buildroot

Solution:

Re-create a soft link from OK3568-linux-source/buildroot/output/OK3568/host/bin/python to python3.

cd buildroot/output/OK3568/host/bin

rm python

ln -s ln -s python3 python

After re-establishing the soft link, recompile. Use ls -l python to check if the soft link is successful.

Guide to Adding Python3-pip Package in OK3568 Buildroot

b. SSL error when using pip install on the development board:

Guide to Adding Python3-pip Package in OK3568 Buildroot

Solution:

Delete the python-related files in OK3568-linux-source/buildroot/output/OK3568/build/ and recompile.

This is because pip installation depends on SSL, and if the full compilation in step 1 was done using python2 for SSL compilation,

pip requires python3. So, after re-linking to python3, recompile the python-related files.

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

./build.sh buildroot

After compilation, burn and verify the file system. Opencv-python related tests can then be performed.

Guide to Adding Python3-pip Package in OK3568 Buildroot


Originally published at www.forlinx.net.


Dear friends, we have created an exclusive embedded technical exchange group on Facebook, where our experts share the latest technological trends and practical skills. Join us and grow together!

Comments
avatar
Please sign in to add comment.