Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install the dependency: lshash3 #46

Closed
avidale opened this issue Oct 10, 2023 · 3 comments
Closed

Cannot install the dependency: lshash3 #46

avidale opened this issue Oct 10, 2023 · 3 comments

Comments

@avidale
Copy link

avidale commented Oct 10, 2023

My package depend on pqkmeans. Some time ago, it started producing errors during installation, because pqkmeans requires lshash3, and for some reason, lshash3 doesn't install anymore.

When I run pip install pqkmeans (Ubuntu, Python 3.10, reproducible in this notebook), I get the following error:

trace

Collecting pqkmeans==1.0.4
  Downloading pqkmeans-1.0.4.tar.gz (158 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.5/158.5 kB 3.3 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from pqkmeans==1.0.4) (1.23.5)
Requirement already satisfied: scikit-learn in /usr/local/lib/python3.10/dist-packages (from pqkmeans==1.0.4) (1.2.2)
Collecting pipe (from pqkmeans==1.0.4)
  Using cached pipe-2.0-py3-none-any.whl (8.8 kB)
Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from pqkmeans==1.0.4) (1.11.3)
Collecting typing (from pqkmeans==1.0.4)
  Downloading typing-3.7.4.3.tar.gz (78 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.6/78.6 kB 8.3 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from pqkmeans==1.0.4) (1.16.0)
Collecting texmex_python==1.0.0 (from pqkmeans==1.0.4)
  Using cached texmex_python-1.0.0-py3-none-any.whl
Collecting lshash3 (from texmex_python==1.0.0->pqkmeans==1.0.4)
  Using cached lshash3-0.0.8.tar.gz (9.4 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: joblib>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->pqkmeans==1.0.4) (1.3.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->pqkmeans==1.0.4) (3.2.0)
Collecting bitarray (from lshash3->texmex_python==1.0.0->pqkmeans==1.0.4)
  Using cached bitarray-2.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (286 kB)
Building wheels for collected packages: pqkmeans, typing, lshash3
  Building wheel for pqkmeans (setup.py) ... done
  Created wheel for pqkmeans: filename=pqkmeans-1.0.4-cp310-cp310-linux_x86_64.whl size=236311 sha256=940d560d65bd2e8ecec652ff7756502f85e47a99a9101b0b500afac859cb8948
  Stored in directory: /root/.cache/pip/wheels/84/fa/fe/7cf22e3d319bb9c9652768e4761b2b219541ad0334b127f340
  Building wheel for typing (setup.py) ... done
  Created wheel for typing: filename=typing-3.7.4.3-py3-none-any.whl size=26305 sha256=a64e1e1c1f212dc750d7dffea39c73c41cb5d2e96e166917de49adeefd665c72
  Stored in directory: /root/.cache/pip/wheels/7c/d0/9e/1f26ebb66d9e1732e4098bc5a6c2d91f6c9a529838f0284890
  error: subprocess-exited-with-error
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Building wheel for lshash3 (setup.py) ... error
  ERROR: Failed building wheel for lshash3
  Running setup.py clean for lshash3
Successfully built pqkmeans typing
Failed to build lshash3
ERROR: Could not build wheels for lshash3, which is required to install pyproject.toml-based projects

Here is where we have discovered the problem: avidale/compress-fasttext#19

Can you please fix this error, e.g. by switching to a well-maintained implementation of lshash, such as https://github.com/guofei9987/pyLSHash?

@gojomo
Copy link

gojomo commented Oct 11, 2023

Happened to be poking around after the SO question, & so also wanted to point out:

  • lshash3 (not updated since 2017) is only brought in via the mysterious texmex-python package, which has no description on either PyPI or Github, and is maybe just an optional demo dataset that'd be easy to drop from requirements unless needed?
  • package lshashpy3 may be another suitable replacement for a texmex-python maintainer to drop-in - seems based on same original Kay Zhu code, so might be API-compatible

@Hi-king
Copy link
Collaborator

Hi-king commented Oct 14, 2023

@avidale @gojomo
Thanks for pointing out the issue with the current installation.
I have created a PR (#47) to move texmex-python to an additional dependency :)

Unfortunately, however, another issue (numpy compatibility) is preventing installation with python 3.10 at the moment: please use Python 3.9 🙇

@Hi-king
Copy link
Collaborator

Hi-king commented Oct 17, 2023

@avidale @gojomo Update: We've released recent v1.0.6, which supports python 3.10 & 3.11. Plz try pip install -U "pqkmeans>=1.0.6"

@Hi-king Hi-king closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants