lucasb-eyer / pydensecrf

Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.
MIT License
1.94k stars 416 forks source link

AttributeError: module 'pydensecrf.densecrf' has no attribute 'DIAG_KERNEL' #67

Closed n3011 closed 6 years ago

n3011 commented 6 years ago

There's an error with this new version [installation either using pypy/pip install + git...]

lucasb-eyer commented 6 years ago

I cannot reproduce this. What I did:

> pip install pydensecrf
> jupyter console
In [1]: import pydensecrf.densecrf as dcrf
In [2]: dcrf.DIAG_KERNEL
Out[2]: <KernelType.DIAG_KERNEL: 1>

So either your setup somehow screwed-up, or you are missing some crucial information in this bugreport.

n3011 commented 6 years ago

Everything works perfectly fine if I install the package from this/earliar commit 1cba07bb4950134f5add4b19795d40f8fa4eb5ba . The errors come up with the latest code-release

lucasb-eyer commented 6 years ago

OK, so now I also did:

> pip install git+https://github.com/lucasb-eyer/pydensecrf.git
> jupyter console
In [1]: import pydensecrf.densecrf as dcrf
In [2]: dcrf.DIAG_KERNEL
Out[2]: <KernelType.DIAG_KERNEL: 1>

so that works too. Both options you say fail in your original post work for me. Your clarification only says where it worked, so doesn't help me reproduce either. So I still can't reproduce your problem. Maybe you can do a binary search for the commit which breaks it? Did you install a recent Cython first?