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

Cannot install it on Mac #19

Closed dagap closed 6 years ago

dagap commented 8 years ago

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.

pmneila commented 8 years ago

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
RichardTaoK commented 5 years ago

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