Closed pkorus closed 8 years ago
At first sight it seems like we're not installing the __init__.py
file, which is a bug. I'll try to fix it over the weekend, but if anyone (@rodrigob maybe?) has an idea before that, I'd be grateful.
I am currently having the same issue, after adding pydensecrf to the syspath I get a pydensecrf.eigen error as well.
@pkorus did you ever find a workaround?
In fact your first suggestion (adding __init__.py
) did the trick for me.
Just move that file into the folder? Thanks!
Just to be clear - after installing the package through pip:
>> touch /usr/lib64/python2.7/site-packages/pydensecrf/__init__.py
And then you can import the package as import pydensecrf.densecrf
Just to be clear - after installing the package through pip:
>> touch /usr/lib64/python2.7/site-packages/pydensecrf/__init__.py
And then you can import the package as import pydensecrf.densecrf
Yeah exactly. The problem is that setup.py
doesn't put it there, and I didn't get around to fixing that yet. PRs are welcome, otherwise I'll give it a go sometime in the next couple weeks.
Awesome! Works for me too. Thanks guys.
I think I fixed it, but it would be nice to have confirmation from someone. You can do pip uninstall pydensecrf
and then install it again with pip as stated in the README.
I've successfully installed the library using:
Now I've got 4 files in
/usr/lib64/python2.7/site-packages/pydensecrf
:However, I cannot import the library in Python. Both:
are unsuccessful (
/usr/lib64/python2.7/site-packages/
is insys.path
). If I explicitly append/usr/lib64/python2.7/site-packages/pydensecrf
tosys.path
, then Python can locate the densecrf library (import densecrf
), but I get an import error:ImportError: No module named pydensecrf.eigen
The problem has been observed under CentOS 7 and Debian Jessie.