无法在 windows 上为 python 安装 fastText。

Unable to install fastText for python on windows.

所以我无法在 windows 上为 python 安装 fasttext。我按照提到的方法in this issue

当我输入 python setup.py install 时,出现以下错误:

error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

我尝试在 https://www.lfd.uci.edu/~gohlke/pythonlibs/#fasttext. It does install a module, however the name of the module is fasttext unlike fastText that gets installed on Ubuntu following the method mentioned in Readme.md. Also the fasttext module that does get installed is unable to load a prebuilt model like wiki.de.bin. I get an error saying Cannot load ../fasttext/wiki.es/wiki.es.bin due to C++ extension failed to allocate the memory Relevant issue 上使用方向盘。

我创建了一个问题 here,我在这里问同样的问题,希望能从这个社区得到更快的回应。

在上面@cgohlke 评论的帮助下,我能够为 windows 安装它。只需转到 https://www.lfd.uci.edu/~gohlke/pythonlibs/#fasttext。根据您的版本下载轮子。 pip install .whl file。现在可以使用了。