Faiss: install issue: raise AttributeError: module 'faiss' has no attribute 'IndexFlatL2'

Created on 26 Apr 2020  ·  3Comments  ·  Source: facebookresearch/faiss

Summary

Platform

OS: ubuntu 16.04

Faiss version: faiss-cpu-1.6.3

Faiss compilation options:

Running on:

  • [x] CPU
  • [ ] GPU

Interface:

  • [ ] C++
  • [x] Python

Reproduction instructions

  1. install with the cmd:
    conda create -n faiss python=3.6
    conda install faiss-cpu -c pytorch
  1. When I run the code of tutorial/python/1-Flat.py, raise the Error:
    Traceback (most recent call last): File "faiss.py", line 12, in <module> import faiss File "1-Flat.py", line 16, in <module> quantizer = faiss.IndexFlatL2(d) # the other index AttributeError: module 'faiss' has no attribute 'IndexFlatL2'

    I have tried Compile from source , it doesn't work too.

Anyone can help me? Thanks!!!

Most helpful comment

Yes. I have this issue because I create a faiss.py file same as the package name. Hope it helps you.

All 3 comments

I have same question,how did you solve it?

Yes. I have this issue because I create a faiss.py file same as the package name. Hope it helps you.

thanks

| |
毕晓鹏
|
|
邮箱:[email protected]
|

签名由 网易邮箱大师 定制

On 06/06/2020 13:00, Godiva wrote:

Yes. I have this issue because I create a faiss.py file same as the package name. Hope it helps you.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Was this page helpful?
0 / 5 - 0 ratings