Instructions to use PaddlePaddle/PaddleOCR-VL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use PaddlePaddle/PaddleOCR-VL with PaddleOCR:
# See https://www.paddleocr.ai/latest/version3.x/pipeline_usage/PaddleOCR-VL.html to installation from paddleocr import PaddleOCRVL pipeline = PaddleOCRVL(pipeline_version="v1") output = pipeline.predict("path/to/document_image.png") for res in output: res.print() res.save_to_json(save_path="output") res.save_to_markdown(save_path="output") - Notebooks
- Google Colab
- Kaggle
执行paddleocr install_genai_server_deps vllm失败
执行paddleocr install_genai_server_deps vllm失败:
/root/miniconda3/envs/ocr_env/lib/python3.10/site-packages/setuptools/init.py:92: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
By 2025-Oct-31, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
/root/miniconda3/envs/ocr_env/lib/python3.10/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: BSD License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
Guessing wheel URL: https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.2/flash_attn-2.8.2+cu12torch2.8cxx11abiTRUE-cp310-cp310-linux_x86_64.whl
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for flash-attn
Running setup.py clean for flash-attn
Failed to build flash-attn
error: failed-wheel-build-for-install
× Failed to build installable wheels for some pyproject.toml based projects
╰─> flash-attn
Installation failed
Traceback (most recent call last):
File "/root/miniconda3/envs/ocr_env/lib/python3.10/site-packages/paddlex/paddlex_cli.py", line 373, in _install_genai_deps
install_packages(["flash-attn == 2.8.2"], constraints="required")
File "/root/miniconda3/envs/ocr_env/lib/python3.10/site-packages/paddlex/utils/install.py", line 81, in install_packages
return install_packages_from_requirements_file(
File "/root/miniconda3/envs/ocr_env/lib/python3.10/site-packages/paddlex/utils/install.py", line 70, in install_packages_from_requirements_file
return subprocess.check_call(args)
File "/root/miniconda3/envs/ocr_env/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/root/miniconda3/envs/ocr_env/bin/python', '-m', 'pip', 'install', '-r', '/tmp/tmpk_5tj585.txt', '-c', '/tmp/tmp23z27ezr.txt']' returned
non-zero exit status 1.
Failed to install dependencies
请问这是什么原因呢,有什么方法修复吗
看起来是安装flash-attn的时候build失败了,可以重试或者尝试安装预编译的flash-attn 2.8.2(https://github.com/mjun0812/flash-attention-prebuild-wheels)