所以我无法在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使用轮子。它确实安装了一个模块,但是该模块的名称是 fasttext ,它不同于 fastText ,它是按照Readme.md
中提到的方法安装在Ubuntu上的。确实安装的fasttext
模块也无法加载wiki.de.bin
之类的预构建模型。我收到一条错误消息,说Cannot load ../fasttext/wiki.es/wiki.es.bin due to C++ extension failed to allocate the memory
Relevant issue。
我创建了一个问题here,并且在这里提出了同样的问题,希望能更快地从这个社区得到答复。
答案 0 :(得分:0)
借助上面@cgohlke注释的帮助,我能够在Windows上安装它。只需转到lfd.uci.edu/~gohlke/pythonlibs/#fasttext。根据您的版本下载滚轮。 pip install .whl file
。现在可以使用了。