简体   繁体   中英

How to install python-crfsuite on windows

I'm trying to install scrapy on win7. One dependency is python-crfsuite. When I run :

pip install python-crfsuite==0.8.4

It fails repeatedly finally giving:

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

Are there any precompiled binary files for win32 for this package?

If you already have a version of Microsoft Visual Studio installed with Common tools. All you need to do is run this command.

set VS90COMNTOOLS=%VS140COMNTOOLS%

Assuming you have Visual Studio 14 installed currently.

Adding this answer to help people who are still trying to install python-crfsuite years later.

I was getting an error message about needing to install Microsoft Visual C++ 14.0 when asking pip to install python-crfsuite on Python 3.8, Windows 10. It kept saying Microsoft Visual C++ is needed to create the wheel.

What finally worked for me was to install python-crfsuite on Python 3.7.4.

I suspect it worked because the python-crfsuite wheel on PyPI was not available for Python 3.8, but it was available for Python 3.7. You can the check the package's PyPI page to see which wheels are available https://pypi.org/project/python-crfsuite/#files

Also, if

pip install python-crfsuite

is not working for you, try downloading the wheel and get pip to install it instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM