用于Ubuntu的PythoncfSuite

2024-06-10 17:14:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在Ubuntu中安装python crfsuite。当我使用pip安装时,我得到一些警告和

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

当我在python中导入crfutils时,它表示找不到模块。在Linux系统中,有什么问题或者不可能?在


Tags: installpipininfo警告foreggubuntu
1条回答
网友
1楼 · 发布于 2024-06-10 17:14:51

安装重要工具

$ apt-get install swig

下载依赖项。在

^{pr2}$

减压。转到结果目录。键入./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中。在

相关问题 更多 >