【问题标题】:Unable to install fastText for python on windows.无法在 Windows 上为 python 安装 fastText。
【发布时间】:2018-08-04 06:13:40
【问题描述】:

所以我无法在 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 memoryRelevant issue

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

【问题讨论】:

  • fastText 是 Facebook 的官方 Python 绑定模块。 fasttext 是目前在 PyPI 上发布的另一个模块/包,但它不再开发并且存在已知的内存问题。我将lfd.uci.edu/~gohlke/pythonlibs/#fasttext 的轮子更改为 Facebook 的绑定。
  • 您提到旧轮子中的 fasttext 存在内存错误。新轮子适用于 fastText
  • @cgohlke 现在可以使用了。请发布答案,以便我接受。

标签: python-3.x fasttext


【解决方案1】:

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

【讨论】:

  • 链接似乎已损坏。 :(
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-05-22
  • 2019-07-13
  • 1970-01-01
  • 1970-01-01
  • 2020-08-29
  • 2016-09-27
  • 2015-07-18
相关资源
最近更新 更多