Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python-crfsuite for Ubuntu

I want to install python-crfsuite in Ubuntu. When I install using pip, I'm getting some warning and

Could not find .egg-info directory in install record for python-crfsuite

When I import crfutils in python, it is saying module not found. What could be the problem or is it is not possible in Linux system?

like image 976
Vignesh Prasad V Avatar asked Feb 11 '26 07:02

Vignesh Prasad V


1 Answers

Install important tools

$ apt-get install swig

Download the dependencies.

$ wget https://github.com/downloads/chokkan/liblbfgs/liblbfgs-1.10.tar.gz

Decompress. Go to the resulting directory. Type ./configure. Then make. Then make install.

Download the actual software source.

$ wget https://github.com/downloads/chokkan/crfsuite/crfsuite-0.12.tar.gz

Decompress the file. Go to the resulting directory. Type ./configure. Then make. Go to the swig>python directory. Type

$ ./prepare.sh --swig
$ python setup.py build_ext
$ python setup.py install

You may need to manually edit export_wrapper.cpp, but the fix is included in README

You may need to add /usr/local/lib to LD_LIBRARY_PATH if you get ImportError: libcrfsuite-0.12.so.

like image 151
goCards Avatar answered Feb 15 '26 06:02

goCards



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!