首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >include Python.h错误:找不到initconfig.h

include Python.h错误:找不到initconfig.h
EN

Stack Overflow用户
提问于 2020-08-02 11:04:01
回答 1查看 3K关注 0票数 6
代码语言:javascript
运行
复制
#include <python3.8/Python.h>

我一直收到错误/usr/include/python3.8/cpython/pystate.h:9:10:致命错误: cpython/initconfig.h:没有这样的文件或目录

代码语言:javascript
运行
复制
9 | #include "cpython/initconfig.h"

最初我只包含了Python.h,但是根本找不到它。我也在运行Void Linux,并且已经安装了python3-devel。

EN

回答 1

Stack Overflow用户

发布于 2020-08-21 18:03:18

尝试找到您的Python.h:

代码语言:javascript
运行
复制
gemfield@ThinkPad-X1C:~$ locate Python.h
/home/gemfield/anaconda3/include/python3.7m/Python.h
/home/gemfield/anaconda3/pkgs/python-3.7.6-h0371630_2/include/python3.7m/Python.h
/usr/include/python3.8/Python.h

然后

代码语言:javascript
运行
复制
g++ -I/usr/include/python3.8 ...
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63211981

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档