langflow
langflow copied to clipboard
Cannot import name 'BaseLanguageModel' from 'langchain.schema'
Describe the bug A clear and concise description of what the bug is.
Browser and Version
- N/A
- macOS 13.3.1 (22E261)
To Reproduce Steps to reproduce the behavior:
- Install miniconda with Python 3.10.10
- Install langflow
- Run langflow
- See error: ImportError: cannot import name 'BaseLanguageModel' from 'langchain.schema' (/Users/user/miniconda3/lib/python3.10/site-packages/langchain/schema.py)
% langflow
Traceback (most recent call last):
File "/Users/user/miniconda3/bin/langflow", line 5, in
Same error here. Checked the latest langchain API, and it does not have this "BaseLanguageModel" class. https://github.com/hwchase17/langchain/blob/master/langchain/schema.py
langchain-0.0.154 broke this. Run
pip install langchain==0.0.153
to pin the old version.
faced the same issue, downgrading to 0.0.153
helped
install langchain==0.0.153
I'll push a hotfix very soon
confirming fix
aiohttp==3.8.4 aiosignal==1.3.1 async-timeout==4.0.2 attrs==23.1.0 certifi==2023.5.7 charset-normalizer==3.1.0 colorama==0.4.6 dataclasses-json==0.5.7 frozenlist==1.3.3 gpt-index==0.6.0 greenlet==2.0.2 idna==3.4 langchain==0.0.165 llama-index==0.6.5 marshmallow==3.19.0 marshmallow-enum==1.5.1 multidict==6.0.4 mypy-extensions==1.0.0 numexpr==2.8.4 numpy==1.24.3 openai==0.27.6 openapi-schema-pydantic==1.2.4 packaging==23.1 pandas==2.0.1 pydantic==1.10.7 python-dateutil==2.8.2 python-dotenv==1.0.0 pytz==2023.3 PyYAML==6.0 regex==2023.5.5 requests==2.29.0 six==1.16.0 SQLAlchemy==2.0.13 tenacity==8.2.2 tiktoken==0.4.0 tqdm==4.65.0 typing-inspect==0.8.0 typing_extensions==4.5.0 tzdata==2023.3 urllib3==1.26.15 yarl==1.9.2