选中内容(绿色)时除了会搜索文章名,还会搜索文章内容
点击结果中的文章名进入文章界面后可以按Ctrl+F在页面内搜索
  • 版权:CC BY-SA 4.0
  • 创建:2023-09-05
  • 更新:2023-09-06


下载源码

https://www.python.org/downloads/source/

编译给 HOST(PC)用的 python

  1. cd Python-3.6.9/
  2. ./configure --prefix=$PWD/../_install_host --enable-shared
  3. make -j`nproc`
  4. make install

配置参数
https://docs.python.org/3/using/configure.html#configure-options

  1. export PATH=_install_hostbin 路径
  2. export LD_LIBRARY_PATH=_install_hostlib路径
  3. python3 --version

编译 target

清除之前的

  1. make distclean

这里是 armA7 为例

  1. ./configure --host=arm-openwrt-linux --build=armv7l --prefix=`pwd`/../python_target --enable-shared --with-build-python --enable-ipv6 ac_cv_file__dev_ptmx="yes" ac_cv_file__dev_ptc="no"
  2. make -j`nproc`
  3. make install

如果最后遇到了subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.

用 root 用户编辑 /usr/bin/lsb_release, #!/usr/bin/python3 改为 python3 即可,这是因为 python3 命令才能调用到我们编译出来的 python3。

文章有误?有想法想讨论?查看或者发起勘误/讨论 主题
(发起评论需要先登录 github)

/wallpaper/wallhaven-lmdvjy.jpg