小编Zos*_*Lee的帖子

在 alpine docker 容器中安装 multidict 时如何修复 gcc 错误?

问:在我的 docker 容器中,我使用 apline linux 系统,该系统已预安装 gcc

应用程序信息:

bash-4.4# apk info
....
gcc
Run Code Online (Sandbox Code Playgroud)

但是当我安装 multidict 时,由于 gcc 错误而失败

bash-4.4# pip install multidict
Collecting multidict
  Using cached https://files.pythonhosted.org/packages/84/96/5503ba866d8d216e49a6ce3bcb288df8a5fb3ac8a90b8fcff9ddcda32568/multidict-4.7.3.tar.gz
Building wheels for collected packages: multidict
  Building wheel for multidict (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-79jceuft/multidict/setup.py'"'"'; __file__='"'"'/tmp/pip-install-79jceuft/multidict/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-57k4lw21 --python-tag cp37
       cwd: /tmp/pip-install-79jceuft/multidict/
 ....
    /usr/local/include/python3.7m/Python.h:11:20: fatal error: limits.h: No such file …
Run Code Online (Sandbox Code Playgroud)

python gcc alpine-linux

4
推荐指数
1
解决办法
3537
查看次数

标签 统计

alpine-linux ×1

gcc ×1

python ×1