from langchain_core.prompts import PromptTemplate
prompt = PromptTemplate(
template="Hello {{ name }}",
template_format="jinja2",
input_variables=["name"]
)
Error:
ModuleNotFoundError: No module named 'jinja2'

from langchain_core.prompts import PromptTemplate
prompt = PromptTemplate(
template="Hello {{ name }}",
template_format="jinja2",
input_variables=["name"]
)
Error:
ModuleNotFoundError: No module named 'jinja2'
Fix:
pip install jinja2
Tell us about your project and get help tailored to your problem.
Contact usEveryone can read. Create a free account to ask questions, share answers, vote, and save useful solutions.