1

I've been working on something which uses an obscure module called "faiss", I'm running under anaconda with all necessary modules, but I've been having problem with this one. during setup, it gives me this error:

"Traceback (most recent call last):
  File "C:\Users\PC\Documents\tensor\content\-EVC-\GUI.py", line 9, in <module>
    import faiss
  File "C:\Users\PC\Documents\tensor\content\-EVC-\faiss\__init__.py", line 32, in <module>
    from .loader import *
  File "C:\Users\PC\Documents\tensor\content\-EVC-\faiss\loader.py", line 65, in <module>
    from .swigfaiss import *
  File "C:\Users\PC\Documents\tensor\content\-EVC-\faiss\swigfaiss.py", line 10, in <module>
    from . import _swigfaiss
ImportError: cannot import name '_swigfaiss' from partially initialized module 'faiss' (most likely due to a circular import) (C:\Users\PC\Documents\tensor\content\-EVC-\faiss\__init__.py)"

i added a photo of what the folder looks like in the directory faiss module's main directory

i'm a rookie in programming so my project is more like a frankenstein of code but i wasnt expecting the modules themselves to fail, also the installer's name is "faiss_cpu-1.7.4-cp311-cp311-win_amd64.whl" my version of python is 3.11.4 and i'm running windows 10

I've tried changing the .pyd file's name to swigfaissp and modified swingfaiss.py so it would search for swigfaissp but nothing changed, i made swingfaiss look for other files and it found them but couldn't do anything of them, and I've made it so python didn't write any cache, nothing changed either.

I'm not entirely sure of what I'm doing and I hope there's a way to fix this.

camickr
  • 321,443
  • 19
  • 166
  • 288
romrom83
  • 11
  • 4

0 Answers0