Skip to content

Dependency issue on Langchain - langchain.prompts import PromptTemplate #1017

@rosh7777

Description

@rosh7777

Describe the bug
Langchain dependency error:

.venv\Lib\site-packages\scrapegraphai\utils\code_error_analysis.py", line 15, in <module>
    from langchain.prompts import PromptTemplate
ModuleNotFoundError: No module named 'langchain.prompts'

To Reproduce
Steps to reproduce the behavior:

  1. python -m venv .venv
  2. source .venv/Scripts/activate
  3. Fresh installation - pip install scrapegraphai

run script:
try: from scrapegraphai.graphs import SmartScraperGraph print("Import successful: SmartScraperGraph imported successfully") except ImportError as e: print(f"Import failed: {e}") except Exception as e: print(f"Unexpected error during import: {e}")

output:
python test_import.py
Import failed: No module named 'langchain.prompts'

Expected behavior
All dependencies should be available

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows
  • Browser: NA
  • Version: 10

Additional context
pip list

Package Version
aiohappyeyeballs 2.6.1
aiohttp 3.13.1
aiosignal 1.4.0
annotated-types 0.7.0
anyio 4.11.0
async-timeout 5.0.1
attrs 25.4.0
beautifulsoup4 4.14.2
boto3 1.40.57
botocore 1.40.57
certifi 2025.10.5
charset-normalizer 3.4.4
click 8.3.0
colorama 0.4.6
dataclasses-json 0.6.7
dill 0.4.0
distro 1.9.0
duckduckgo_search 8.1.1
filelock 3.20.0
free_proxy 1.1.3
frozenlist 1.8.0
fsspec 2025.9.0
greenlet 3.2.4
h11 0.16.0
html2text 2025.4.15
httpcore 1.0.9
httpx 0.28.1
httpx-sse 0.4.3
huggingface-hub 0.35.3
idna 3.11
jiter 0.11.1
jmespath 1.0.1
jsonpatch 1.33
jsonpointer 3.0.0
jsonschema 4.25.1
jsonschema-specifications 2025.9.1
langchain 1.0.2
langchain-aws 1.0.0
langchain-classic 1.0.0
langchain-community 0.4
langchain-core 1.0.0
langchain-mistralai 1.0.0
langchain-ollama 1.0.0
langchain-openai 1.0.1
langchain-text-splitters 1.0.0
langgraph 1.0.1
langgraph-checkpoint 3.0.0
langgraph-prebuilt 1.0.1
langgraph-sdk 0.2.9
langsmith 0.4.37
lxml 6.0.2
marshmallow 3.26.1
minify_html 0.16.4
mpire 2.10.2
multidict 6.7.0
multiprocess 0.70.18
mypy_extensions 1.1.0
numpy 2.3.4
ollama 0.6.0
openai 2.6.0
orjson 3.11.3
ormsgpack 1.11.0
packaging 25.0
pip 24.0
playwright 1.55.0
primp 0.15.0
propcache 0.4.1
pydantic 2.12.3
pydantic_core 2.41.4
pydantic-settings 2.11.0
pyee 13.0.0
Pygments 2.19.2
python-dateutil 2.9.0.post0
python-dotenv 1.1.1
pywin32 311
PyYAML 6.0.3
referencing 0.37.0
regex 2025.10.23
requests 2.32.5
requests-toolbelt 1.0.0
rpds-py 0.28.0
s3transfer 0.14.0
scrapegraph_py 1.36.0
scrapegraphai 1.63.0
semchunk 3.2.3
simpleeval 1.0.3
six 1.17.0
sniffio 1.3.1
soupsieve 2.8
SQLAlchemy 2.0.44
tenacity 9.1.2
tiktoken 0.12.0
tokenizers 0.22.1
tqdm 4.67.1
typing_extensions 4.15.0
typing-inspect 0.9.0
typing-inspection 0.4.2
undetected-playwright 0.3.0
urllib3 2.5.0
xxhash 3.6.0
yarl 1.22.0
zstandard 0.25.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions