繁体   English   中英

make:在pkg-config搜索路径中找不到python软件包

[英]make: Package python was not found in the pkg-config search path

$ 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 ++编写的utils,但出现此错误:

在pkg-config搜索路径中找不到python软件包。

Utils文件夹包含.cpp和.py文件(也使用Python进行处理)

我有python 3.6.1

make:*** [all-python2]错误1

似乎需要python 2。

但是我不确定在安装python 2. *并将其添加到系统变量后是否会消失。 谁能确定?

更新

尽管makefiles具有python 3行:

SHELL := /bin/bash

.PHONY: all-python2 all-python3
all-python2:
    pip install runcython
    makecython++ stitch_wrapper.pyx "" "stitch_rects.cpp ./hungarian/hungarian.cpp"

all-python3:
    pip3 install runcython3
    makecython3++ stitch_wrapper.pyx "" "stitch_rects.cpp ./hungarian/hungarian.cpp"

对我而言,在Arch Linux(4.15.11-1)上,makecython也无法找到python.pc 我检查了pkg-config --variable pc_path pkg-config ,发现相应的搜索路径仅包含文件python3.pcpython2.pc

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM