[英]python-crfsuite for Ubuntu
我想在Ubuntu中安裝python-crfsuite。 當我使用pip安裝時,我收到了一些警告
在python-crfsuite的安裝記錄中找不到.egg-info目錄
當我在python中導入crfutils時,它說的是找不到模塊。 可能是什么問題,或者在Linux系統中是不可能的?
安裝重要工具
$ apt-get install swig
下載依賴項。
$ wget https://github.com/downloads/chokkan/liblbfgs/liblbfgs-1.10.tar.gz
解壓縮。 轉到結果目錄。 輸入./configure
。 然后make
。 然后make install
。
下載實際的軟件源。
$ wget https://github.com/downloads/chokkan/crfsuite/crfsuite-0.12.tar.gz
解壓縮文件。 轉到結果目錄。 輸入./configure
。 然后make
。 轉到swig>python
目錄。 類型
$ ./prepare.sh --swig
$ python setup.py build_ext
$ python setup.py install
您可能需要手動編輯export_wrapper.cpp
,但修復程序包含在README
如果遇到ImportError: libcrfsuite-0.12.so
則可能需要將/usr/local/lib
添加到LD_LIBRARY_PATH
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.