make:在pkgconfig搜索路径中找不到包python

2024-05-29 11:23:08 发布

您现在位置:Python中文网/ 问答频道 /正文

$ make
pip install runcython
Requirement already satisfied: runcython in d:\programfiles\conda\lib\site-packages
Requirement already satisfied: Cython>=0.10 in d:\programfiles\conda\lib\site-packages (from runcython)
makecython++ stitch_wrapper.pyx "" "stitch_rects.cpp ./hungarian/hungarian.cpp"
Package python was not found in the pkg-config search path.
Perhaps you should add the directory containing `python.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python' found
stitch_wrapper.cpp:4:20: fatal error: Python.h: No such file or directory
 #include "Python.h"
                    ^
compilation terminated.
make: *** [all-python2] Error 1

正在尝试编译用c++编写的一些实用程序,但出现以下错误:

Package python was not found in the pkg-config search path.

Utils文件夹包括.cpp和.py文件(也使用Python进行某些操作)

我有python3.6.1

make: *** [all-python2] Error 1

似乎它想要Python2。在

但我不确定在安装Python2.*并将其添加到系统变量后,问题是否会消失。谁知道呢?在

更新

虽然makefiles有3行python:

^{pr2}$

Tags: theinmakelibpackagessiterequirementconda
1条回答
网友
1楼 · 发布于 2024-05-29 11:23:08

对于我来说,在ArchLinux(4.15.11-1)上,makecython也无法找到python.pc。 我检查了pkg-config variable pc_path pkg-config,发现各自的搜索路径只包含文件python3.pc和{}。在

所以我用sudo ln -s /usr/lib/pkgconfig/python3.pc /usr/lib/pkgconfig/python.pc添加了一个符号链接,现在一切都正常了。在

相关问题 更多 >

    热门问题