Hey Reddit,

I’m hitting a wall while trying to work with Langchain in my project. Here’s the error I’m encountering:

Traceback (most recent call last): File "C:\Users\CROSSHAIR\Desktop\AI_Project_Manager\app\test_agent.py", line 1, in <module> from langchain.chains import LLMChain ModuleNotFoundError: No module named 'langchain.chains'

What I’ve Tried:

  • I’ve uninstalled and reinstalled Langchain several times using pip install langchain.
  • I checked that Langchain is installed properly by running pip list.
  • Even created a new environment from scratch and tried again. Still no luck.

I’m running my project locally using Python 3.10 and a conda environment, and I'm working with the qwen2.5-7b-instruct-q4_k_m.gguf model. Despite these efforts, I can’t seem to get rid of this issue where it can't find langchain.chains.

Anyone else encountered this problem? Any ideas on how to resolve this?

Would appreciate any help!

  • Is there a file in the folder you are running from called langchain.py? Rename it to something else.