Guide to Adding Python3-pip Package in OK3568 Buildroot
OK3568 4.19.232 buildroot adds python3-pip installation package.
1. Modify buildroot/package/Config.in to add python-pip/Config.in.
2. Download python-pip and extract the compressed package to the buildroot/package directory.
3. Modify the defconfig file used by buildroot. Execute make menuconfig in the buildroot/output/OK3568 directory to select python3 and python-pip.
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.
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:
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.
b. SSL error when using pip install on the development board:
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.
Comments