Python 环境安装

为 GK7206 板卡提供 Python 3.11 运行环境与 IO 扩展库,安装到 /mnt/python

一键安装

wget https://mirrors.shimetapi.cn/repos/GK7206/shimeta-py/install_python.sh -O - | sh

未指定版本时自动读取服务器 LATEST(当前最新 1.0.4)。

指定版本

# 通过 wget 管道
wget https://mirrors.shimetapi.cn/repos/GK7206/shimeta-py/install_python.sh -O - | sh -s -- -v 1.0.2

# 或先下载脚本再执行
sh install_python.sh -v 1.0.2

可用版本

版本 说明
1.0.4 最新(xmm 输出坐标修复)
1.0.3 / 1.0.2 / 1.0.1 / 1.0.0 历史版本

完整列表见软件仓库 shimeta-py/ 目录

安装后验证

# 当前终端立即生效
. /mnt/python/setup.sh

# 验证
python3 -c 'print(1+1)'

重启后自动生效(已写入 /etc/profile)。

IO 扩展库

shimeta-py/ 目录下提供两个硬件 IO 扩展库,按需下载到板卡:

文件 说明
i2c_io.so I2C 接口 IO 扩展
serial_io.so 串口 IO 扩展
wget https://mirrors.shimetapi.cn/repos/GK7206/shimeta-py/i2c_io.so -O /mnt/python/lib/python3.11/site-packages/shimeta_py/i2c_io.so