kyamagu / faiss-wheels

Unofficial faiss wheel builder
MIT License
291 stars 38 forks source link

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

Closed blast-hardcheese closed 9 months ago

blast-hardcheese commented 9 months ago

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):

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

kyamagu commented 9 months ago

This is a known issue, will be fixed in the next release. https://github.com/kyamagu/faiss-wheels/issues/78

blast-hardcheese commented 9 months ago

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