3

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?

Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501
Vignesh Prasad V
  • 419
  • 3
  • 17

1 Answers1

5

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.

goCards
  • 1,388
  • 9
  • 10
  • there are a few more steps to this. I will edit the post with the full procedure. – goCards Feb 22 '16 at 01:14
  • Note that python-crfsuite is not the same as official swig crfsuite wrapper, it is a separate package. Commands above will install a swig-based wrapper. – Mikhail Korobov Oct 29 '16 at 19:16