usnistgov / nestor-tmp2

Quantifying tacit knowledge for investigatory analysis
Other
9 stars 5 forks source link

Install from pip fails: `Failed building wheel for python-levenshtein` #24

Closed rtbs-dev closed 6 years ago

rtbs-dev commented 6 years ago

It appears the current way to install from pip is not installing a C library where needed.

perhaps removing the hard dependency on python-Levenstein and switching to fuzzywuzzy[speedup] will work?

Happened on Windows, and a fresh Miniconda3 Docker image.

rtbs-dev commented 6 years ago

It seems like we can't assume C/C++ library is installed in the Windows case (or Miniconda, though the Docker image can use RUN apt-get -y install gcc to guarantee successful install).

We might have to fall back on pure fuzzywuzzy, and advise users that slow GUI may require them to install python-Levenshtein, however the are able. At least for now.

rtbs-dev commented 6 years ago

This gets back to an old problem we had with designing custom distance measures or not. I think for now, wrapping the pure-python fuzzywuzzy in something like a BKtree will give us the speed-boost we need (and the initial tree building will get completed at app-launch)

rtbs-dev commented 6 years ago

Closing, since the problem is averted for now. Moving further updates to #29

vineetmp commented 6 years ago

I was trying to install fuzzywuzzy using pip install fuzzywuzzy, but I got the warning: C:\ProgramData\Anaconda3\lib\site-packages\fuzzywuzzy\fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning') When I tried pip install python-Levenshtein, I got the error: Failed building wheel for python-Levenshtein. How can this be overcome so that I can get fuzzywuzzy to work? Thank you.

rtbs-dev commented 6 years ago

@vineetmp That first warning is ok, it's just fuzzywuzzy letting you know it will run slowly (though it's not incredibly noticeable at the scales nestor is running at). Everything will still run fine and fuzzywuzzy should behave normally, so you can ignore the warning, for the most part.

Can you verify nestor-gui runs successfully without pyLev?

As for failing to build the wheel for pyLev, this happens for me when there's no C/C++ library installed (which is why the requirement for it was removed from nestor, see above), so in Windows you need Visual Studio, etc, and in Linux you need gcc, for example. Still, it shouldn't be necessary to have pyLev installed for nestor-gui to work.

vineetmp commented 6 years ago

@tbsexton thanks for the answer, I was able to use fuzzywuzzy without any issue so far. Could you clarify how I should verify that nestor-gui runs successfully without pyLev?

rtbs-dev commented 6 years ago

assuming you were able to install nestor, are you able to use the nestor-gui command in the terminal/command-line? Does the GUI launch successfully?

vineetmp commented 6 years ago

I don't think I had to install nestor before, however, I installed it now, and nestor-gui in the Anaconda prompt gives the error: 'nestor-gui' is not recognized as an internal or external command, operable program or batch file. Is that what you were asking?

rtbs-dev commented 6 years ago

Were you just trying to use fuzzywuzzy? Or was this in the process of using Nestor? This is the Nestor development repository, fuzzywuzzy is one of our dependencies.

vineetmp commented 6 years ago

I was just trying to use fuzzywuzzy, sorry about that. I should have checked that before posting my question.

rtbs-dev commented 6 years ago

Not a problem, glad it works.

juveria-afreen commented 5 years ago

i cant install ESSENTIA in python 3.6. its showing " Failed building wheel for essentia" ...pz help me out with this

TitanFighter commented 4 years ago

sudo apt-get install python3-dev build-essential fixed the issue