ModuleNotFoundError: No module named 'Levenshtein'

元气小坏坏 提交于 2021-02-11 16:51:31

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/60269283/modulenotfounderror-no-module-named-levenshtein

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!