-
Notifications
You must be signed in to change notification settings - Fork 16.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not import NotRequired from typing_extensions.py #6245
Comments
Generated by a 🤖 AnswerI found related issues that might be helpful. I did my best to summarize the solutions, but I recommend looking at the related issues yourself. Related IssuesClosed Issuesimport langchain with python<=3.9 failsThe suggested solution is: To update pydantic, you can run: pip install --upgrade pydantic Then, you can test the update with the following commands: python -m "import langchain"
pip freeze | grep pydantic This response is meant to be helpful and save users time. It is not meant to be a precise solution. Please leave a 👍 if this is helpful and 👎 if it is irrelevant |
Hi, @AniketModi! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale. Based on my understanding, you reported an issue where running a project with LangChain version 0.0.198 or higher throws an exception related to importing "NotRequired" from typing_extensions.py. devstein suggested updating pydantic to the latest version (1.10.8) as it has fixed similar issues in the past. They provided instructions on how to update pydantic and test the update. Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days. Thank you for your contribution to the LangChain repository! |
System Info
Langchain version >= 0.0.198 and python version 3.9
Who can help?
No response
Information
Related Components
Reproduction
install python3.9
install following requirements
Flask==1.0.2
jsonobject== 2.1.0
gunicorn==20.1.0
gevent==21.12.0
greenlet==1.1.2
py-healthcheck==1.9.0
aenum==2.2.3
flask-log-request-id==0.10.1
numpy==1.19.5
faiss-cpu==1.7.0
sentence-transformers==2.2.2
contractions==0.0.25
grpcio==1.39.0
tensorflow==2.6.0
tensorflow-serving-api==2.5.2
keras==2.6.0
PyYAML~=6.0
setuptools~=60.10.0
requests~=2.28.2
Werkzeug~=2.2.3
transformers~=4.21.3
Jinja2>=2.10.1,<3.1
itsdangerous==2.0.1
elastic-apm[flask]==6.7.0
langchain==0.0.198
openai==0.27.4
redis==4.5.4
tiktoken==0.2.0
mysql-connector-python==8.0.33
kafka-python==2.0.2
pymongo==3.6.1
import following library --
from langchain.chains.conversational_retrieval.prompts import CONDENSE_QUESTION_PROMPT, QA_PROMPT
Expected behavior
When I am running project with LangChain >= 0.0.198, I am getting exception that Can't Import NotRequired from typing_extensions.py.
The text was updated successfully, but these errors were encountered: