I want to use langchain for my project.
so I installed it using following command : pip install langchain
but While importing "langchain" I am facing following Error:
File /usr/lib/python3.8/typing.py:774, in _GenericAlias.__subclasscheck__(self, cls)
772 if self._special:
773 if not isinstance(cls, _GenericAlias):
--> 774 return issubclass(cls, self.__origin__)
775 if cls._special:
776 return issubclass(cls.__origin__, self.__origin__)
TypeError: issubclass() arg 1 must be a class
Any one who can solve this error ?
So I was trying it for hours and at last I found a solution hope it helps you.
First, I did this:
pip install typing-inspect==0.8.0 typing_extensions==4.5.0
Then:
pip install pydantic -U
After this will throw an error but once again I did:
pip install pydantic==1.10.11
Then it started working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With