没有Python.h头文件的解决方法

编程入门 行业动态 更新时间:2024-10-15 04:21:49

没有Python.h头文件的<a href=https://www.elefans.com/category/jswz/34/1770089.html style=解决方法"/>

没有Python.h头文件的解决方法

In file included from plugins/python/pyutils.c:1:0:plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: 没有那个文件或目录#include <Python.h>^~~~~~~~~~compilation terminated.In file included from plugins/python/python_plugin.c:1:0:plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: 没有那个文件或目录#include <Python.h>^~~~~~~~~~compilation terminated.

我想有很多人都有过上面的报错情况,例如安装uWSGI?

其实这是你的系统没有安装Python-dev导致的问题,这里以Ubantu为例子只需要输入下面代码就可以解决

# 因为我的是Python2 Python3环境都有所以我是用Python3的时候需要在python后面加上3,根据自身情况选择,如果没有安装双环境那么只需输入python-dev即可
sudo apt-get install python3-dev

Windows如何解决该问题?

windows都安装了pip吧,那就不去要sudo 直接 pip install python3-dev
 

更多推荐

没有Python.h头文件的解决方法

本文发布于:2024-02-24 15:43:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1695815.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:解决方法   头文件   Python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!