My makefile:
SHELL := /bin/bash
.PHONY: all
all:
pip install runcython
makecython++ stitch_wrapper.pyx "" "stitch_rects.cpp ./hungarian/hungarian.cpp"
hungarian: hungarian/hungarian.so
hungarian/hungarian.so:
cd hungarian && \
TF_INC=$$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())') && \
if [ `uname` == Darwin ];\
then g++ -std=c++11 -shared hungarian.cc -o hungarian.so -fPIC -I $$TF_INC -undefined dynamic_lookup;\
else g++ -std=c++11 -shared hungarian.cc -o hungarian.so -fPIC -I $$TF_INC; fi
I have already installed
-cython
-runcython
-python-dev
-python3-dev
-cffi
Unfortunately I continue to get the error:
pkg-config: command not found
.cpp:4:20: fatal error: Python.h: No such file or directory
compilation terminated.
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 1
-I/usr/include/python3.5 -lpython3.5
aftermakecython++
command line with no success and get the errormakecython++ requires a *.pyx file.
seems that flag syntax isn't correct for makecython++ – Orthodoxymakecython++
so I'm guessing a bit, but I think you want to send those flags to g++ rather thanmakecython++
– Clowpkg-config
part) but I wonder if it does it for Python2 rather than Python3. I have no really idea how to fix it though. – Clow