rapidfuzz / RapidFuzz

Rapid fuzzy string matching in Python using various string metrics

Home Page:https://rapidfuzz.github.io/RapidFuzz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleNotFoundError: No module named 'rapidfuzz.string_metric'

shrey10926 opened this issue · comments

I have installed rapidfuzz using pip install rapidfuzz. If i try to import from rapidfuzz.string_metric import levenshtein I get the error.
My python version is 3.8.0. OS is Ubuntu 20.04.

Any help would be appreciated!
Thanks in advance!

The string_metric module was deprecated in v2.0.0 and removed in v3.0.0. You can use:

from rapidfuzz.distance import Levenshtein
Levenshtein.distance(...)

instead