ztane / python-Levenshtein

The Levenshtein Python C extension module contains functions for fast computation of Levenshtein distance and string similarity
GNU General Public License v2.0
1.26k stars 155 forks source link

installation instructions needed #23

Open ggdhines-zz opened 9 years ago

ggdhines-zz commented 9 years ago

I've done sudo python setup.py install but then when I try: import Levenshtein Traceback (most recent call last): File "", line 1, in File "Levenshtein/init.py", line 1, in from Levenshtein import _levenshtein ImportError: cannot import name _levenshtein

In the source directory, I've done gcc -Wall -I/usr/include/python2.7 -lpython2.7 -c _levenshtein.c to create a file _levenshtein.o, but that doesn't seem to help.

I'm sure this is obvious for some people but better instructions are needed.

ztane commented 9 years ago

you'd install the package using pip: pip install python-Levenshtein (would also download and install properly).

ghost commented 8 years ago

hi @ztane I know this we should install using pip, but right now I am working in a big cluster where I can't install it, and we don't even have virtualend, or so. My only option is to provide this module aside the scripts I am using, so of course my first try was import Levenshtein and then it fails as said with ImportError: cannot import name _levenshtein Is there any workaround for this particular case? Thanks for your help

bigsmiles commented 7 years ago

I met the same problem! how do you solve it ?

ztane commented 7 years ago

@bigsmiles you need to install it with its setup.py. If you cannot install it with pip from pypi, then build a reusable wheel for your architecture and then install that with pip. Unfortunately, I don't have much time to provide a precompiled wheel except perhaps I could consider supporting Linux with manylinux image.