regarding the ImportError: cannot import name '_maxflow' from 'maxflow'
wenouyang opened this issue · 2 comments
wenouyang commented
Hello, I have successfully installed the package using pip. However, when I try to test the program, I got the following error message. I think it might be related to the _maxflow.pyx but I do not know the reason.
Traceback (most recent call last):
File "test_maxflow.py", line 6, in <module>
import maxflow
File "C:\Users\Desktop\Experiments\PyMaxflow-master\maxflow\__init__.py", line 36, in <module>
from . import _maxflow
ImportError: cannot import name '_maxflow' from 'maxflow' (C:\Users\Desktop\Experiments\PyMaxflow-master\maxflow\__init__.py)
nirmalsnair commented
I think the source files are causing this error. Since you've already installed PyMaxflow
via pip
, you don't have to keep the source files. Just move the test_maxflow.py
script and the examples
folder to a separate location and run.
pmneila commented
Installing from pip now will install a pre-compiled binary wheel for most platforms and Python versions. This problem should not happen anymore.
Best