快活林资源网 Design By www.csstdc.com

apk换源

sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

安装Python的构建环境

apk add --no-cache --virtual build-dependencies python3-dev libffi-dev openssl-dev gcc libc-dev make

安装Python依赖包 ImportError: cannot import name 'Feature' from 'setuptools'

pip install --upgrade pip setuptools==45.2.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

ModuleNotFoundError: No module named 'Cython'

pip install cython -i https://pypi.tuna.tsinghua.edu.cn/simple

pymssql安装不上

command 'gcc' failed with exit status 1

后面发现是漏装了一个环境freetds-dev
重新安装之后,就能成功安装依赖了

apk add freetds-dev

注意的是,依赖成功安装之后,如果为了docker镜像大小,卸载了freetds-dev这个环境包,会导致访问数据库的时候报错libsybdb.so.5: cannot open shared object file: No such file or directory

grpcio安装不上

和上面一样,漏了环境build-base linux-headers

执行apk add build-base linux-headers之后,就能成功安装

Pillow安装不上

和上面一样,漏了环境jpeg-dev zlib-dev

执行apk add jpeg-dev zlib-dev之后,就能成功安装

最后卸载依赖

apk del build-dependencies
快活林资源网 Design By www.csstdc.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
快活林资源网 Design By www.csstdc.com