Open ggdhines-zz opened 9 years ago
you'd install the package using pip
: pip install python-Levenshtein
(would also download and install properly).
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
I met the same problem! how do you solve it ?
@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.
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.