The Nightman
The Nightman

Reputation: 5759

Using python-Levenshtein without install

I have downloaded python-levenshtein from here and I need to use it on a cluster where I do not have sudo abilities. Is there some way to just unzip the contents and use them locally so I can use something like below in a python script?

from Levenshtein import distance

I suppose this is even a general question as well, in that I would like to know if there is a good way to use python libraries when I do not have the ability to put them in the python2.7 or python3.0 directories.

Thanks.

Upvotes: 0

Views: 893

Answers (1)

python-Levenshtein is not a pure-python implementation, but a library written in C with thin Python bindings. Thus you must install it first. To use it without sudo rights, you'd might have to create a virtual environment.

Upvotes: 2

Related Questions