While looking for a solution for the Hungarian problem, I found this GitHub link.
I went through the readme.md
file and I performed everything described there. After copying hungarian.so
into my working directory, when I tried to compile hungarian.cpp
using make hungarian
, I got this output:
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
#include "Python.h"
^
compilation terminated.
make: *** [hungarian] Error 1
I found this related question on Stack Overflow, but the answer didn't work for me.
I am very new to GitHub I don't know how to add modules on g++
. Can someone help me with that, and what to do next?
For Ubuntu 15.10 and Python 3:
After looking at https://github.com/hrldcpr/hungarian/blob/master/hungarian.cpp, it seems that you need both:
So install the following packages:
To identify the missing packages (the ones providing the headers), look at packages.ubuntu.com.
This is python code extending with C. No need to use
make
. Python itself will take care of thecpp
code compilation with proper flags.First you need to have header files and a static library. Install those as,
Now follow these commands to execute
example.py
in your code.