gpt4 book ai didi

python - "The C extension could not be compiled' 错误。 - 在安装 Flask 时

转载 作者:IT老高 更新时间:2023-10-28 20:31:05 26 4
gpt4 key购买 nike

在 debian 7 上的 virtualenv 中安装 flask 时出现以下错误。apt-get-install 告诉我我已经有 GCC。我尝试了 apt-get install libpcre3-dev 但随后使用 pip install Flask-scss --force-reinstall -I 重新安装了 flask ,但仍然遇到相同的错误。如何解决此问题以便使用加速?

错误:

markupsafe/_speedups.c:12:20: fatal error: Python.h: No such file or directory
compilation terminated.
==========================================================================
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
Retrying the build without the C extension now.


==========================================================================
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python installation succeeded.
==========================================================================

最佳答案

您需要安装 python-dev package也;这取决于 contains Python.h 的正确包:

apt-get install python-dev

关于python - "The C extension could not be compiled' 错误。 - 在安装 Flask 时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24097129/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com