You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows环境下无法安装PaddleOCR的问题求助

问题描述

我正按照PaddleOCR的快速开始指南安装PaddleOCR包,执行命令:

pip install "paddleocr>=2.0.1" # Recommend to use version 2.0.1+

时,构建Polygon3 wheel出现如下错误:

Building wheel for Polygon3 (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
Using NumPy extension!
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-37
creating build\lib.win-amd64-cpython-37\Polygon
copying Polygon\IO.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon\Shapes.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon\Utils.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon_init_.py -> build\lib.win-amd64-cpython-37\Polygon
running build_ext
building 'Polygon.cPolygon' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for Polygon3
Running setup.py clean for Polygon3
Failed to build Polygon3
Installing collected packages: Polygon3, lmdb, zipp, typing-extensions, tifffile, shapely, scipy, rapidfuzz, PyWavelets, python-dateutil, pyparsing, pycryptodome, opencv-python, opencv-contrib-python, networkx, MarkupSafe, lxml, itsdangerous, imageio, future, fonttools, et-xmlfile, dill, cython, cycler, cssselect, colorama, cachetools, Babel, attrdict, Werkzeug, tqdm, pandas, packaging, openpyxl, multiprocess, kiwisolver, Jinja2, importlib-metadata, bce-python-sdk, scikit-image, matplotlib, cssutils, click, premailer, imgaug, flask, Flask-Babel, visualdl, paddleocr
Running setup.py install for Polygon3 ... error
error: subprocess-exited-with-error

× Running setup.py install for Polygon3 did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Using NumPy extension!
running install
C:\Users\jd\miniconda3\envs\ocrpaddle\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-37
creating build\lib.win-amd64-cpython-37\Polygon
copying Polygon\IO.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon\Shapes.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon\Utils.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon_init_.py -> build\lib.win-amd64-cpython-37\Polygon
running build_ext
building 'Polygon.cPolygon' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> Polygon3

note: This is an issue with the package mentioned above, not pip.

当前使用环境:Python 3.7 的 conda 环境。

解决方案

方法1:安装C++编译工具链

直接解决编译依赖问题:

  • 下载并运行Microsoft C++ Build Tools安装程序
  • 在安装界面勾选**"Desktop development with C++"**组件(包含VC++ 14.0及以上编译工具)
  • 安装完成后重启终端,重新执行PaddleOCR的安装命令

方法2:安装预编译的Polygon3包

跳过编译步骤,直接安装适配环境的预编译wheel:

  1. 激活conda环境后执行:
pip install Polygon3==3.0.9.post1 --only-binary :all:
  1. 完成后再执行PaddleOCR安装命令:
pip install "paddleocr>=2.0.1"

方法3:使用conda安装Polygon3

利用conda的预编译包生态:

conda install -c conda-forge polygon3

安装完成后再执行PaddleOCR的安装命令。

内容的提问来源于stack exchange,提问作者Jaime Acevedo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 17:05:19