用docker的python镜像构建,会报下面的错误
Seifon opened this issue · 5 comments
Seifon commented
#0 173.9 gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-v6ocy15s/httptools_ca538d10eadc4602bd329d3013470470/vendor/llhttp/include -I/tmp/pip-install-v6ocy15s/httptools_ca538d10eadc4602bd329d3013470470/vendor/llhttp/src -I/usr/local/include/python3.8 -c httptools/parser/parser.c -o build/temp.linux-aarch64-3.8/httptools/parser/parser.o -O2
#0 173.9 unable to execute 'gcc': No such file or directory
#0 173.9 error: command 'gcc' failed with exit status 1
#0 173.9 [end of output]
#0 173.9
#0 173.9 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 173.9 ERROR: Failed building wheel for httptools
#0 173.9 Running setup.py clean for httptools
#0 175.2 Successfully built PyYAML aget docopt mugen
#0 175.2 Failed to build baidupcs-py cffi httptools
#0 175.2 ERROR: Could not build wheels for baidupcs-py, which is required to install pyproject.toml-based projects
Seifon commented
使用的0.7.5版本
Seifon commented
已解决
通过:apk add gcc g++ libffi-dev musl-dev 解决
xyb commented
如果要避免本地编译,需要:
- mugen 更新,使用最新的 httptools。已经提交 issue PeterDing/mugen#2
- BaiduPCS-Py 发布的版本中增加 wheel 二进制文件
xyb commented
@PeterDing 另外,建议 simple_cipher 剥离出去,作为依赖包,这样 build wheels 也会简单很多。