# Module not found error: langchain\_huggingface

**URL:** <https://discuss.huggingface.co/t/module-not-found-error-langchain-huggingface/94764>\
**Category:** Beginners\
**Created:** [June 30, 2024, 7:14am UTC](https://discuss.huggingface.co/t/module-not-found-error-langchain-huggingface/94764 "2024-06-30T07:14:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhargab101](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@bhargab101](https://discuss.huggingface.co/u/bhargab101)\
**Post date:** [June 30, 2024, 7:14am UTC](https://discuss.huggingface.co/t/module-not-found-error-langchain-huggingface/94764/1 "2024-06-30T07:14:56Z")

</div>

In my Huggingface application I have mentioned langchain-huggingface module in the requirements.txt file. Now when I import langchain\_hugging face in my app it is giving module not found error. Why?  
Here is the code:  
app.py file:  
import streamlit as st  
from langchain\_huggingface import HuggingFaceEndpoint

def load\_answer(question):  
llm = HuggingFaceEndpoint(repo\_id=“mistralai/Mistral-7B-Instruct-v0.3”)

```
answer=llm.invoke(question)
return answer

```

st.set\_page\_config(page\_title=“LangChain Demo”, page\_icon=“🤖”)  
st.header(“LangChain Demo”)

def get\_text():  
input\_text = st.text\_input("You: ", key=“input”)  
return input\_text

user\_input=get\_text()  
response = load\_answer(user\_input)

submit = st.button(‘Generate’)

#If generate button is clicked  
if submit:

```
st.subheader("Answer:")

st.write(response)

```

requirements.txt file:

langchain  
langchain-huggingface  
streamlit  
huggingface-hub
