hwchase17 / chat-your-data

MIT License
901 stars 266 forks source link

ModuleNotFoundError: No module named 'faiss.swigfaiss_avx2' #1

Open VGraupera opened 1 year ago

VGraupera commented 1 year ago

hitting this error, created new miniconda environment with python 3.11 on m2 mac, looked online at how to fix swigfaiss_avx2 but didnt find good solution. any tips appreciated

(langchain) 2023/chat-your-data[master|✔] % python app.py

Traceback (most recent call last): File "/Users/vidalgraupera/code/2023/chat-your-data/app.py", line 7, in vectorstore = pickle.load(f) ^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'faiss.swigfaiss_avx2'

gpww commented 1 year ago

running into same issue on windows seriver 2019, created new conda environment with python 3.10:

(LangChain) D:\Code\LangChain\chat-your-data>python app.py Traceback (most recent call last): File "D:\Code\LangChain\chat-your-data\app.py", line 10, in vectorstore = pickle.load(f) ModuleNotFoundError: No module named 'faiss.swigfaiss_avx2'

siddhantdante commented 1 year ago

this error occurs when you use a pickle file generated on a different CPU architecture which supports avx2. Try to generate your own pickle file

juanmillans commented 1 year ago

Hi siddhantdante I ran into the same error, how can I generate my own pickle file, given I am in a windows OS? , and based on what should i generate it?

fowlert commented 1 year ago

Had the same problem on a mini M2. Fixed in by running "python ingest_data.py" to create a new pickle file.
This step is covered in the blog post https://blog.langchain.dev/tutorial-chatgpt-over-your-data/ which I failed to read carefully enough.

nicoduffy commented 1 year ago

Had the same issue on Win11 home ed. 22h2. Followed what @fowlert did to fix it.