kyamagu / faiss-wheels

Unofficial faiss wheel builder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing `faiss-cpu` via Poetry doesn't install dependencies

blast-hardcheese opened this issue · comments

Describe the bug

Installing faiss-cpu via poetry does not install any transitive dependencies.

To Reproduce

faiss-cpu-missing-numpy user$ python -m venv venv > /dev/null
faiss-cpu-missing-numpy user$ . venv/bin/activate
(venv) faiss-cpu-missing-numpy user$ pip install poetry > /dev/null

[notice] A new release of pip is available: 23.2.1 -> 23.3.2
[notice] To update, run: pip install --upgrade pip
(venv) faiss-cpu-missing-numpy user$ poetry init -n
(venv) faiss-cpu-missing-numpy user$ poetry add faiss-cpu
Using version ^1.7.4 for faiss-cpu

Updating dependencies
Resolving dependencies... (0.7s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing faiss-cpu (1.7.4)

Writing lock file
(venv) faiss-cpu-missing-numpy user$ poetry run python
Python 3.11.6 (main, Oct  2 2023, 13:45:54) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import faiss
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/private/tmp/faiss-cpu-missing-numpy/venv/lib/python3.11/site-packages/faiss/__init__.py", line 11, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'
>>>

Expected behavior

Required dependencies should be installed

Desktop (please complete the following information):

  • OS: MacOS, Linux
  • Architecture: x86_64, arm64
  • Python: 3.11.6, 3.10.11
  • Version: faiss_cpu-1.7.4

Additional context
I tried both in a Replit repl, as well as locally on my Mac, getting the same result in both environments.

This is a known issue, will be fixed in the next release. #78

Very much appreciated, please pardon the noise. I didn't see that one when searching.