# langchain deprecation warnings when running prodigy (but I can pip uninstall \`langchain\`...)

**URL:** https://support.prodi.gy/t/langchain-deprecation-warnings-when-running-prodigy-but-i-can-pip-uninstall-langchain/7047
**Category:** Uncategorized
**Created:** [January 23, 2024, 12:33pm UTC](https://support.prodi.gy/t/langchain-deprecation-warnings-when-running-prodigy-but-i-can-pip-uninstall-langchain/7047 "2024-01-23T12:33:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vish](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vish/32/2258_2.png) [@vish](https://support.prodi.gy/u/vish)
#### Post date: [January 23, 2024, 12:33pm UTC](https://support.prodi.gy/t/langchain-deprecation-warnings-when-running-prodigy-but-i-can-pip-uninstall-langchain/7047/1 "2024-01-23T12:33:37Z")

</div>

when running prodigy (`{textcat|spans}.manual`)  
I get a TON of warnings from langchain  
`.... site-packages/langchain/llms/ __init__.py:548: LangChainDeprecationWarning: Importing LLMs from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:`  
`from langchain_community.llms import VolcEngineMaasLLM`.

like - A LOT  
but prodigy still runs.

if I  
`pip uninstall langchain`  
Prodigy works fine, and no warnings are issued.

why is it importing langchain to begin with?  
it must be, otherwise I wouldn't get the warnings.  
But then, why isn't it complaining when I uninstall langchain?

---

<div class="post-metadata">

### Author: ![magdaaniol](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/magdaaniol/32/2787_2.png) [@magdaaniol](https://support.prodi.gy/u/magdaaniol)
#### Post date: [January 24, 2024, 10:07am UTC](https://support.prodi.gy/t/langchain-deprecation-warnings-when-running-prodigy-but-i-can-pip-uninstall-langchain/7047/2 "2024-01-24T10:07:27Z")

</div>

Hey @vish,

`langchain` is being [conditionally imported](https://github.com/explosion/spacy-llm/blob/dee642d3a284b7585266b52329754bcac717ee7b/spacy_llm/compat.py#L20-L26) by `spacy-llm` ("if available in env, import"), while `spacy-llm` is imported by Prodigy and that's how the warning pops up.  
It's definitely confusing to see this warning out of the blue, so we'll see if it can be captured and presented better to the user.  
Independently, I've pinged `spacy-llm` team to check if this above linked import statement should be updated.
