I downloaded the python-Levenshtein archive and extracted the Levenshtein directory. So, as a result, I have the following file structure:
Levenshtein - __init__.py - _levenshtein.c - _levenshtein.h - StringMatcher.py myscript.py
And the following myscript.py content:
from Levenshtein import * from warnings import warn print Levenshtein.distance(string1, string2)
But I get the following error -
Traceback (most recent call last): File "myscript.py", line 1, in <module> from Levenshtein import * File "/path/to/myscript/Levenshtein/__init__.py", line 1, in <module> from Levenshtein import _levenshtein ImportError: cannot import name _levenshtein
What is wrong here?
LA_
source share