Error with Annoy module in virtual environment when using NemoGuardrails in a Streamlit app

57 Views Asked by At

I've encountered an issue with the Annoy module within my virtual environment while developing a Streamlit app that incorporates LangChain, OpenAI, and NemoGuardrails. Despite installing the Annoy module within the virtual environment, I consistently receive a "no module named annoy" error when running my app. Here are the steps I've taken to troubleshoot:

  1. Confirmed the installation of the Annoy module within the virtual environment using pip list.
  2. Activated the virtual environment using source venv/bin/activate.
  3. Verified that the Python script is utilizing the correct Python interpreter from the virtual environment.
  4. Attempted to dynamically install the Annoy module at the beginning of the script using subprocess.call(['pip', 'install', 'annoy']), followed by import annoy.

Despite these efforts, the error persists. Could anyone provide insights or suggestions on how to resolve this issue? Any assistance would be greatly appreciated. Thank you!

0

There are 0 best solutions below