Search code examples
pythonnlpdata-sciencechatbotlangchain

import langchain => Error : TypeError: issubclass() arg 1 must be a class


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 ?


Solution

  • typing-inspect==0.8.0
    typing_extensions==4.5.0