pairon
pairon

Reputation: 437

ModuleNotFoundError: No module named 'Levenshtein'

I installed Levenshtein using pip and it's included in pip list packages. But when I run a python script, appears this error:

ModuleNotFoundError: No module named 'Levenshtein'

This is the pip list:

Cython (0.29.15)
docopt (0.6.2)
dyNET (2.1)
mosestokenizer (1.1.0)
numpy (1.16.6)
openfile (0.0.7)
pip (9.0.1)
python-Levenshtein (0.12.0)
setuptools (28.8.0)
toolwrapper (1.0.0)
uctools (1.0.2)
wheel (0.29.0)

The gcc is linked to the environment variables.

Any suggestions? Thanks in advance.

Upvotes: 1

Views: 17218

Answers (3)

Afaf
Afaf

Reputation: 1

try from rapidfuzz import levenshtein

Upvotes: 0

Lucas Alves
Lucas Alves

Reputation: 11

pip install python-Levenshtein==0.12.0

Upvotes: 1

Kent Shikama
Kent Shikama

Reputation: 4070

Try executing the following

$ pip show python-Levenshtein | grep Location
$ python -c "import sys; print(sys.path)"

If the package location is not in the sys.path then that would cause the error.

Upvotes: 0

Related Questions