I also had a similar problem when using langchain. You can also explicitly import the library before importing the library causing the error.
import pydantic.deprecated.decorator