python-Levenshtein icon indicating copy to clipboard operation
python-Levenshtein copied to clipboard

installation instructions needed

Open ggdhines-zz opened this issue 9 years ago • 4 comments

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.

ggdhines-zz avatar Apr 25 '15 09:04 ggdhines-zz

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

ztane avatar May 01 '15 20:05 ztane

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

ghost avatar Sep 14 '16 14:09 ghost

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

bigsmiles avatar Jul 21 '17 03:07 bigsmiles

@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.

ztane avatar Jul 22 '17 14:07 ztane