How to include Python pip3 modules in OpenWRT image

我只是一个虾纸丫 提交于 2019-12-22 12:24:13

问题


I'm going to include pip3 modules in OpenWRT image, so it won't require other dependencies after installed OpenWRT image.

For example, I'm going to include argparse module in OpenWRT image. This module may be installed by the following command in initial OpenWRT image:

opkg install python3
pip3 install argparse

How can I include them in initial OpenWRT firmware?

Thanks!


回答1:


First, run make menuconfig, and then select Languages -> Python, and then select python3,python3-pip, then save and then exit.

Next, run ./scripts/env new py3-argparse to create a build environment for your changes.

Finally, download the argparse library and place it in files/lib/python3.6/site-packages.

References:

OpenWrt - Build Environments

Python3 - argparse (source)



来源:https://stackoverflow.com/questions/50218544/how-to-include-python-pip3-modules-in-openwrt-image

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!