我已经在我的程序中包含了Python.h,当我编译这个程序时,它显示了多个错误,告诉我"Unable to打开几个库“错误消息如下
Error E2209 C:\Borland\bcc55\INCLUDE\Python.h 7: Unable to open include file 'patchlevel.h'
Error E2209 C:\Borland\bcc55\INCLUDE\Python.h 8: Unable to open include file 'pyconfig.h'
Error E2209 C:\Borland\bcc55\INC
在为匈牙利问题寻找解决方案时,我找到了这个GitHub链接。
我查看了readme.md文件,并执行了这里描述的所有内容。在将hungarian.so复制到我的工作目录后,当我试图使用make hungarian编译hungarian.cpp时,我得到了以下输出:
anupam@JAZZ:~/Python/hungarian-master$ make hungarian
g++ hungarian.cpp -o hungarian
hungarian.cpp:7:20: fatal error: Python.h: No such file or directory
#inclu
我将跟随学习如何用C\C++代码扩展Python.
名为“用GCC构建Microsoft Windows下的扩展模块”的部分失败了,错误如下:
fatal error: Python.h: No such file or directory
名为“使用Microsoft Visual C++构建扩展模块”的部分也失败了,并出现了类似的错误:
fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
我该怎么解决这个问题呢?
我有一个CMake项目,到目前为止,我已经用Eclipse成功地构建了这个项目。(该项目的详细设置说明。)那是Ubuntu的伙伴16.04和Eclipse露娜。
我刚升级到Ubuntu伙伴18.04。由于Eclipse将不再启动(大概是由于与新OpenJDK版本的兼容性问题),我想是时候升级到氧气了。
一旦我有了Eclipse氧气和所有附加组件的设置,我就打开工作区并尝试构建这个项目。它失败了,收到了以下消息:
/home/user149408/src/navit/navit/binding/python/common.h:20:10: fatal error: Python.h: No su
不知道为什么,但是sagemaker抱怨无法安装某些python包。使用cloudtemplate自动部署。不确定如何在sagemaker上安装python-dev。 Running setup.py install for cymem: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0]
我只是编写了一个简单的C可执行文件,以检查Python.h是否正常工作
#include<Python.h>
#include<stdio.h>
int main()
{
printf("this is a python header file included programm\n");
return 0;
}
显然,它没有多大作用。但是,当我试图用gcc编译它时,它会给出一个错误:
foo.c:1:19: fatal error: Python.h: No such file or directory.
然后我检查了看python是否
下面是我得到的错误。 SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-d ev|python-devel.
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’
int exp (void);
^~~
_configtest.c:1:20: fatal error: Python.h: No such file or directory
如果这是一个愚蠢的问题,我道歉。但我试着在谷歌上搜索,我找不到任何东西来指引我正确的方向。我只是想知道我需要做些什么来“设置”cdt来“理解”我的python.h包含。
错误的陈述如下:
#include <Python.h>
但我也试过
#include "Python.h"
而CDT的响应是在侧面显示一个错误符号,声明:
Multiple markers at this line
- fatal error: Python.h: No such file or
directory
- Unresolved inclusion: <Python.h>
在C文件中包含"Python.h“: #include <Python.h> 给出Python.h: No such file or directory错误。我寻找其他有同样问题的人,但没有人直接回答如何在arch Linux上安装python*-dev (python2和python3)。顺便说一句,this answer没有arch安装命令。
我试图通过使用python.h头文件从c程序中运行一些python代码,但我一直收到fatal error: Python.h: No such file or directory
在检查我的anaconda环境后,我在...Anaconda/envs/myenv/include中找到了一个Python.h文件,我尝试将此路径添加到我的系统变量的path中,但它不起作用。如何将anaconda环境中的Python.h文件包含到我的程序中?
我已经在装有6.1版软件的windows7家庭高级电脑上下载了3.5版本的python。我希望使用带有python库扩展的C主程序。我已经加载了include文件夹的路径和dev studio c编译器的库文件夹。我正在使用提供的打印时间的测试程序进行测试,但我得到了一个编译错误。虽然它可以找到Python.h,但它找不到python35_d.lib。我也不能。它是否在下载中丢失了,或者这是下载中某个库的另一个名称?谢谢
我为这个新手的问题道歉。我目前希望将一个小的python代码嵌入到一个主C代码中。有人建议在头处使用#include <Python.h>。我已经这样做了,我的Ubuntu12-0.4机器也安装了python-dev。
通过运行locate Python.h,我得到了/usr/include/python2.7/Python.h。
但是,当我将Python.h包含到我的C程序中时,它仍然给了我fatal error: python.h: No such file or directory。
所以Python.h还没有包括在Makefile中。但我不知道该如何做。查看我的包列表:Ma
我尝试使用brew安装postgresql,结果是
checking for libperl... yes
checking Python.h usability... no
checking Python.h presence... no
checking for Python.h... no
configure: error: header file <Python.h> is required for Python
在这个错误之后,我安装了Python,它说:
brew install python
Warning: python-2.7.5 already installe