install pyahocorasick Report errors :
error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools
In use pip install pyahocorasick Wrong time , Say lack vc++14.0
vc++14.0 Namely vc++2015, Full name :Microsoft Visual c ++ 2015
Installation pure python Of ahocorasick package , Bypass this VC Difficult environmental problems , use windows The probability of running programs will not be to deploy stable services , It is estimated that the speed requirement is not too high .
ahocorasick There is a pure python Version of :ackit, direct pip install :
pip inastll ackit
After installation , Can directly import ahocorasick
import ahocorasick
ackit Of ahocorasick How to use and pyahocorasick It's basically the same .
ackit The function and pyahocorasick identical , because ackit Is pure python edition , Not as fast as pyahocorasick Of .
If functional logic is required , that ackit Convenient and quick , i wish you a happy voyage ;
If you have high requirements for speed , Deal with environmental problems honestly , Install again pyahocorasick.
Attached with this open source tool GitHub Address :
pure python Of ahocorasick tool kit ackit
I think this solution is the best in the whole network , Nothing is simpler than this !