[英]How to install python-crfsuite on windows
我正在嘗試在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 的預編譯二進制文件?
如果您已經安裝了帶有通用工具的 Microsoft Visual Studio 版本。 您需要做的就是運行此命令。
set VS90COMNTOOLS=%VS140COMNTOOLS%
假設您當前安裝了 Visual Studio 14。
添加此答案以幫助多年后仍在嘗試安裝 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 來安裝它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.