构建 fastText 时在 Windows 上出现错误 2

make error 2 on Windows when building fastText

我正在尝试构建 fastText(Facebook 用于学习单词表示和句子分类的库)并尝试按照其 Github 页面上的说明进行操作:

$ git clone git@github.com:facebookresearch/fastText.git $ cd fastText $ make

我安装了 GnuWin32 并添加到路径中以便使用 make 功能。我在 Windows 10.

但是我收到以下错误: $ make c++ -pthread -O3 -funroll-loops -std=c++0x -c src/args.cc process_begin: CreateProcess(NULL, c++ -pthread -O3 -funroll-loops -std=c++0x -c src/args.cc, ...) failed. make (e=2): The system cannot find the file specified. make: *** [args.o] Error 2

有人知道如何解决这个问题吗?谢谢!

发布此问题后,Facebook 澄清 FastText 仅基于 Mac OS 和 Linux 发行版。参见 https://github.com/facebookresearch/fastText

我在尝试使用 MinGW 工具在 Windows 上构建 fastText 时遇到了类似的错误。我转而使用 Visual C++ 2015 来构建 fastText,经过一些调整后它运行良好。我为此更改提交了 Pull Request https://github.com/facebookresearch/fastText/pull/39

我还为 Windows 维护了 fastText 的二进制构建。您可以在 http://cs.mcgill.ca/~mxia3/FastText-for-Windows/

找到它

FastText’s authors do not currently support building and running on Windows. There were attempts to run with Bash for Windows and MinGW. This unofficial build is compiled with Visual C++ 2015 to run natively on Windows