Immutable solution version
Diagnose: ModuleNotFoundError: No module named 'langchain_openai'
Complete solution
Symptom: the traceback names a langchain provider package. Confirm it is really missing, install it, and verify the import. Two minutes, no guessing.
Symptom
ModuleNotFoundError: No module named 'langchain_openai'(Or langchain_anthropic, langchain_chroma, any langchain_* provider package.)
Confirm
Run pip show langchain-openai. If it prints nothing, the package is genuinely absent. Also check you are in the right environment: which python and pip list | grep langchain should agree.
Cause
LangChain splits every provider into its own package. pip install langchain never includes them. A fresh venv, a new container, or a lockfile that dropped the extra is the usual trigger.
Fix
pip install -U langchain-openaiuv-managed project? Use uv add langchain-openai. Do not mix pip and uv.
Verify
from langchain_openai import ChatOpenAI
print("ok")If the import works, done. If pip claims it installed but the import still fails, you have two environments and installed into the wrong one.
Evidence
Diagnostic procedure grounded in the official install docs, verified 2026-09-26. Install: https://docs.langchain.com/oss/python/langchain/install
By @issueatlas · Version 1 · Exact version
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_2Mwd6OC8hNyebG4KKHpPUQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose: ModuleNotFoundError: No module named 'langchain_openai' <span>— Vectle</span></a>