avidale / compress-fasttext

Tools for shrinking fastText models (in gensim format)
MIT License
165 stars 13 forks source link

error install pqkmeans #19

Closed HossamAmer12 closed 9 months ago

HossamAmer12 commented 9 months ago

When I try to install pqkmeans, I find this error:

running install_egg_info Copying lshash3.egg-info to build/bdist.linux-x86_64/wheel/lshash3-0.0.8-py3.8.egg-info running install_scripts error: invalid command 'bdist_wininst' [end of output]note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for lshash3

Any clue about lshash3?

avidale commented 9 months ago

No idea. Can you share the environment you are working with? OS, Python version, etc. I'll try reproducing the problem.

HossamAmer12 commented 9 months ago

Thanks so much.

Just want to share the only way I found to solve this:

  1. Create a conda env with python3.7
  2. Clone the repo
  3. pip install -r requirements.txt
  4. pip install compress-fasttext==0.0.7

if needed pip install fasttext==0.9.2

HossamAmer12 commented 9 months ago

@avidale I am still confused as to why I cannot install the latest compress fasttext

Python3.8 - Ubunto 18.0 - compress-fasttext==0.1.3 gensim==4.3.2

Using the old compress fast text is causing me other issues

HossamAmer12 commented 9 months ago

Made SO question for this problem: https://stackoverflow.com/questions/77258294/compressfasttext-pqkmeans-does-not-install

avidale commented 9 months ago

The problem seems to be with installing lshash3, which is the dependency of pqkmeans, which is the dependency of compress-fasttext. So maybe it would make sense to contact the maintainers of lshash3. Here is their PyPI page https://pypi.org/project/lshash3, but I couldn't find their github. Judging from the PyPI page, the maintainer is https://gitlab.com/hobs.

HossamAmer12 commented 9 months ago

@avidale Do you have a way/patch to get around this error?

Hobs does not seem easily reachable via social media. I tried.

avidale commented 9 months ago

I can probably drop pqkmeans as a dependency, and re-implement their compression algorithm within the compress-fasttext codebase. But it will take more than a moment.

HossamAmer12 commented 9 months ago

Thanks, @avidale .. Yes, please keep me posted. Btw, are you able to have the correct env on your computer? or you see the same error?

Can you please help me with my questions on either the other issues or the email I sent to you?

HossamAmer12 commented 9 months ago

@avidale Can we use Faiss PQ instead? If yes, do you have any idea what could be changed?

HossamAmer12 commented 9 months ago

Just want to say that the answer in this SO link solves this pqkmeans issue.

avidale commented 9 months ago

@HossamAmer12 I have just updated compress-fasttext to the version 0.1.4 that doesn't require pqkmeans as a dependency, and instead copypastes the quantizer from it. This version should no longer have the installation problems; please check it out!

HossamAmer12 commented 9 months ago

@HossamAmer12 I have just updated compress-fasttext to the version 0.1.4 that doesn't require pqkmeans as a dependency, and instead copypastes the quantizer from it. This version should no longer have the installation problems; please check it out!

@avidale That's great. Thanks @avidale - I will have a look :))