pmneila / PyMaxflow

Python library for creating flow networks and computing the maxflow/mincut (aka graph-cuts for Python)

Home Page:http://pmneila.github.io/PyMaxflow/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot install it on Mac

dagap opened this issue · comments

I have using OS X Yosemite version 10.10.3. I tried to install it both for Python 2.7 and 3.4 (from the package manager pip and from the sources as well) and when I try to import the module, I get the following error:

  36 import numpy as np
 ---> 37 from . import _maxflow
 38 from ._maxflow import GraphInt, GraphFloat, moore_structure, vonNeumann_structure
 39 from .version import __version__, __version_str__, __version_core__

ImportError: cannot import name _maxflow

is it something you have encountered? Would be great to have a fix. I can supply more information, if needed.

Hi,

That's strange. My first guess is that you might be compiling the module for a version of Python different to the one you are using when you import the module.

Are you using the default OSX Python distribution, a scientific distribution (such as Anaconda) or your own compiled distribution? Could you give me the output of the following commands?

$ which python
$ which ipython
$ which pip

hi,i try to import maxflow , but i get the following error,cannot import name '_maxflow',can you give me some advice
image