pmneila / PyMaxflow

Python library for creating flow networks and computing the maxflow/mincut (aka graph-cuts for Python)
http://pmneila.github.io/PyMaxflow/
242 stars 59 forks source link

build error #17

Closed cuekoo closed 9 years ago

cuekoo commented 9 years ago

How to solve the following issue?

clang: error: no such file or directory: 'maxflow/src/_maxflow.c'

clang: error: no input files

error: command 'cc' failed with exit status 1
pmneila commented 9 years ago

Hi,

I need more details. How are you building the package? Are you using python setup.py build or pip install PyMaxflow?

What versions are you using for distutils, setuptools and cython? You can get the versions with:

$ python -c 'import distutils; print distutils.__version__'
$ python -c 'import setuptools; print setuptools.__version__'
$ python -c 'import cython; print cython.__version__'

As a first guess, this thread might be related to your problem, and they claim that installing the distribute package fixes it.

cuekoo commented 9 years ago

@pmneila Thank you. The solution works.

For later reference, the details are:

  1. Both python setup.py build and pip install PyMaxFlow didn't work
  2. distutils version 2.7.5; setuptools version 14.3.1; cython version 0.22