Could not import sentence_transformers python package when running "python privateGPT.py"
After ingesting the documents, when I run "python privateGPT.py", gives the following error:
Traceback (most recent call last):
File "/Users/pedrobeirao/privateGPT/venv/lib/python3.10/site-packages/langchain/embeddings/huggingface.py", line 46, in init
import sentence_transformers
File "/Users/pedrobeirao/privateGPT/sentence-transformers/sentence_transformers/init.py", line 3, in
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/pedrobeirao/privateGPT/privateGPT.py", line 76, in pip install sentence_transformers.
MacBook Pro Apple M1 MacOs Monterrey
Can you try it;
pip install sentence-transformers==2.2.1
Installing pip install sentence-transformers==2.2.1 doesn't work, the problem is the missing symbol _sqlite3_enable_load_extension. You can fix it by re-configuring and recompiling python with the sqlite extensions: ./configure --enable-loadable-sqlite-extensions && make && sudo make install
See https://stackoverflow.com/questions/1210664/no-module-named-sqlite3
Thanks! I cloned privateGPT and installed the requirements on a base conda environment instead of a dedicated environment as I did before, and it's now working.
On Sat, Jun 3, 2023 at 1:10 AM David Rostcheck @.***> wrote:
Installing pip install sentence-transformers==2.2.1 doesn't work, the problem is the missing symbol _sqlite3_enable_load_extension. You can fix it by re-configuring and recompiling python with the sqlite extensions: ./configure --enable-loadable-sqlite-extensions && make && sudo make install
See https://stackoverflow.com/questions/1210664/no-module-named-sqlite3
— Reply to this email directly, view it on GitHub https://github.com/imartinez/privateGPT/issues/570#issuecomment-1574424274, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY4O2I5KV3OUD63DBCXQ7U3XJJXIDANCNFSM6AAAAAAYVHVLIE . You are receiving this because you authored the thread.Message ID: @.***>
Can you try it;
pip install sentence-transformers==2.2.1
thank you so much, this solved my problem