DQinYuan / chinese_province_city_area_mapper

一个用于提取简体中文字符串中省,市和区并能够进行映射,检验和简单绘图的python模块
MIT License
1.67k stars 397 forks source link

使用cpca过程中,报错缺少某些库,如下 #107

Open yanjinping-pig opened 2 years ago

yanjinping-pig commented 2 years ago

Traceback (most recent call last): File "D:\pythonProject\huafen.py", line 2, in import cpca File "D:\Python-3.9\lib\site-packages\cpca__init__.py", line 7, in from .matcher import Matcher File "D:\Python-3.9\lib\site-packages\cpca\matcher.py", line 1, in import ahocorasick ModuleNotFoundError: No module named 'ahocorasick'

MrCat9 commented 2 years ago

这个是AC自动机的python实现库。

conda install -c http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ pyahocorasick  # 先安装pyahocorasick
pip install -i https://pypi.doubanio.com/simple/ cpca