【问题标题】:Installing megam for NLTK on Windows在 Windows 上为 NLTK 安装 megam
【发布时间】:2017-10-21 02:34:54
【问题描述】:

我需要为 Python 中的 nltk 分类例程安装 megam。 我遵循了来自 this post:
的 Milk Magic 的指示 0. 从http://www.umiacs.umd.edu/~hal/megam/index.html下载megamem源码
1. 使用 gcc、make 和 ocaml 包安装 cygwin
2.修改了makefile
3. 尝试使用 makefile 编译 megam 时,我收到以下内容的错误

制作
ocamldep *.mli *.ml > .depend ocamlc -g -custom -o megam str.cma -cclib -lcamlstr bigarray.cma -cclib -lbigarray unix.cma -cclib -lunix -I /lib/ocaml/caml fastdot_c.c fastdot.cmo intHashtbl.cmo arry.cmo util .cmo data.cmo bitvec.cmo cg.cmo wsemlm.cmo bfgs.cmo pa.cmo perceptron.cmo radapt.cmo kernelmap.cmo abffs.cmo main.cmo
sh:flexlink:找不到命令
文件“fastdot_c.c”,第 1 行:
错误:构建自定义运行时系统时出错 make: *** [Makefile:101: megam] 错误 2

你知道问题可能是什么吗?
也许有人最近解决了同样的问题并可以提供帮助。

【问题讨论】:

    标签: python makefile cygwin nltk


    【解决方案1】:

    因为错误是

    sh: flexlink: command not found
    

    你需要找到包含它的包

    $ cygcheck -p flexlink
    Found 5 matches for flexlink
    flexdll-0.34-1 - flexdll: Creates DLLs with runtime symbol resolution (installed binaries and support files)
    flexdll-0.35-1 - flexdll: Creates DLLs with runtime symbol resolution (installed binaries and support files)
    flexdll-0.35-2 - flexdll: Creates DLLs with runtime symbol resolution
    ...
    

    所以你需要安装flexdll包。

    $ cygcheck -l flexdll |grep bin
    /usr/bin/flexlink
    

    【讨论】:

    • 谢谢!我之前也得出了同样的结论,但是 cygwin 安装程序没有向我显示任何“flexlink”包,所以我只是安装了“开发”类别中的所有内容并且它工作正常。
    • 是的,cygcheck -c 显示包“flex 2.6.4-1”和“flexdll 0.35-2”已安装。
    猜你喜欢
    • 2012-09-18
    • 1970-01-01
    • 2011-05-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-31
    • 2017-09-30
    相关资源
    最近更新 更多