PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
11.98k stars 2.91k forks source link

[Question]: RequestsDependencyWarning: urllib3 (1.26.15) or chardet (5.1.0)/charset_normalizer (3.1.0) doesn't match a supported version! ImportError cannot import name 'inference' from 'paddle' #5421

Open MonCac opened 1 year ago

MonCac commented 1 year ago

请提出你的问题

/Library/Python/3.9/site-packages/requests/init.py:102: RequestsDependencyWarning: urllib3 (1.26.15) or chardet (5.1.0)/charset_normalizer (3.1.0) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported " Traceback (most recent call last): File "/Users/moncheri/Downloads/PaddleNLP-develop/applications/question_answering/unsupervised_qa/run_pipelines_example.py", line 19, in from pipelines.document_stores import FAISSDocumentStore File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/pipelines/init.py", line 39, in from pipelines import pipelines, utils File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/pipelines/pipelines/init.py", line 15, in from pipelines.pipelines.base import Pipeline, RootNode File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/pipelines/pipelines/base.py", line 52, in from pipelines.nodes.base import BaseComponent # isort: skip File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/pipelines/nodes/init.py", line 15, in from pipelines.utils.import_utils import safe_import # isort: skip File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/pipelines/utils/init.py", line 15, in from pipelines.utils.preprocessing import convert_files_to_dicts, tika_convert_files_to_dicts File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/pipelines/utils/preprocessing.py", line 21, in from pipelines.nodes.file_converter import ( File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/pipelines/nodes/file_converter/init.py", line 36, in from pipelines.nodes.file_converter.image import ImageToTextConverter File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/pipelines/nodes/file_converter/image.py", line 21, in from paddleocr import PaddleOCR File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/paddleocr/paddleocr.py", line 37, in from tools.infer import predict_system File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/paddleocr/tools/infer/predict_system.py", line 31, in import tools.infer.utility as utility File "/Users/moncheri/Library/Python/3.9/lib/python/site-packages/paddleocr/tools/infer/utility.py", line 24, in from paddle import inference ImportError: cannot import name 'inference' from 'paddle' (/Users/moncheri/Library/Python/3.9/lib/python/site-packages/paddle/init.py)

w5688414 commented 4 months ago

我测了一下没啥问题:

image

请升级一下paddle版本试一下