引子
青龙面板2.11.3镜像自带python3版本为3.9.7,后面装依赖aiohttp时一直报错装不上,没搜到解决办法,就想着反过来解决python3.9.7
准备
参考:How to install specific version of python on Alpine linux
升级Python3.10
版本跨度不宜过大,选择升级到3.10
# 进入docker
docker exec -it qinglong bash
# 升级python3.10
apk --update --no-cache add python3~3.10 --repository=https://mirrors.aliyun.com/alpine/v3.17/main
报错:temporary error (try again later)
升级python3.10
后续
升级完python3.10后直接pip安装aiohttp会报错:
pip报错
参考 - Stack Overflow
python3 -m ensurepip
pip3 install --no-cache --upgrade pip setuptools
安装依赖成功