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

Faiss-cpu requires numpy, but numpy not installed as a dependency of faiss-cpu #78

Closed
geoffreyblake opened this issue Jun 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@geoffreyblake
Copy link
Contributor

Describe the bug
Doing a simple pip install of faiss-cpu and then importing the library into python will fail because it depends on numpy.

To Reproduce
Describe the steps to reproduce the behavior:

python3 -m pip install faiss-cpu
python3 "import faiss"

Sees the following error

Collecting faiss-cpu
  Downloading faiss_cpu-1.7.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 24.8 MB/s eta 0:00:00
Installing collected packages: faiss-cpu
Successfully installed faiss-cpu-1.7.4
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Traceback (most recent call last):
  File "/io/test-script.py", line 1, in <module>
    import faiss
  File "/usr/local/lib/python3.10/dist-packages/faiss/__init__.py", line 11, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

Expected behavior
Installing faiss-cpu should pull in all its dependencies automatically.

Desktop (please complete the following information):

  • OS: Linux
  • Architecture: x86_64 or aarch64
  • Python: 3.9
  • Version: latest

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants