【问题标题】:How to install python-crfsuite on windows如何在 Windows 上安装 python-crfsuite
【发布时间】:2020-01-04 00:42:43
【问题描述】:

我正在尝试在 win7 上安装 scrapy。一个依赖项是 python-crfsuite。当我跑步时:

pip install python-crfsuite==0.8.4

反复失败终于给:

copying pycrfsuite\__init__.py -> build\lib.win32-2.7\pycrfsuite
running build_ext
building 'pycrfsuite._pycrfsuite' extension
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27

这个包有没有预编译的win32二进制文件?

【问题讨论】:

  • skashyap 的回答对你有用吗?

标签: python python-crfsuite


【解决方案1】:

如果您已经安装了带有常用工具的 Microsoft Visual Studio 版本。您需要做的就是运行此命令。

set VS90COMNTOOLS=%VS140COMNTOOLS%

假设您当前安装了 Visual Studio 14。

【讨论】:

    【解决方案2】:

    添加此答案以帮助多年后仍在尝试安装 python-crfsuite 的人。

    当我要求 pip 在 Python 3.8、Windows 10 上安装 python-crfsuite 时,我收到一条关于需要安装 Microsoft Visual C++ 14.0 的错误消息。它一直说需要 Microsoft Visual C++ 来创建轮子。

    最终对我有用的是在 Python 3.7.4 上安装 python-crfsuite。

    我怀疑它起作用了,因为 PyPI 上的 python-crfsuite 轮不适用于 Python 3.8,但它可用于 Python 3.7。您可以检查包的 PyPI 页面以查看可用的轮子 https://pypi.org/project/python-crfsuite/#files

    如果

    pip install python-crfsuite
    

    不适合你,尝试下载轮子并让 pip 安装它。

    【讨论】:

      猜你喜欢
      • 2020-01-15
      • 2022-11-23
      • 2010-10-27
      • 2021-05-28
      • 2012-10-23
      • 2017-12-14
      • 2010-11-29
      相关资源
      最近更新 更多