欢迎光临
我们一直在努力

”ERROR: Failed building wheel for Polygon3“ 安装Polygon3时提示错误的解决方法

在安装CnOCR是需要使用到Polygon3这个包,安装时提示报错,需要使用到Microsoft Visual C++ 14.0。

需要下载的工具:Microsoft C++ 编译工具(Microsoft C++ Build Tools)

下载地址:https://visualstudio.microsoft.com/visual-cpp-build-tools/

错误提示:

Building wheels for collected packages: Polygon3
Building wheel for Polygon3 (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for Polygon3 (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
NumPy extension not found - disabling support for it!
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\Polygon
copying Polygon\IO.py -> build\lib.win-amd64-cpython-310\Polygon
copying Polygon\Shapes.py -> build\lib.win-amd64-cpython-310\Polygon
copying Polygon\Utils.py -> build\lib.win-amd64-cpython-310\Polygon
copying Polygon\__init__.py -> build\lib.win-amd64-cpython-310\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
Failed to build Polygon3
ERROR: Could not build wheels for Polygon3, which is required to install pyproject.toml-based projects
PS D:\SynologyDrive> pip install Polygon3
Collecting Polygon3
Using cached Polygon3-3.0.9.1.tar.gz (39 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: Polygon3
Building wheel for Polygon3 (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for Polygon3 (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
NumPy extension not found - disabling support for it!
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\Polygon
copying Polygon\IO.py -> build\lib.win-amd64-cpython-310\Polygon
copying Polygon\Shapes.py -> build\lib.win-amd64-cpython-310\Polygon
copying Polygon\Utils.py -> build\lib.win-amd64-cpython-310\Polygon
copying Polygon\__init__.py -> build\lib.win-amd64-cpython-310\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
Failed to build Polygon3
ERROR: Could not build wheels for Polygon3, which is required to install pyproject.toml-based projects

下载并安装Microsoft C++ 生成工具进行MSVC v140-VS 2015 C++生成工具的安装

打开安装工具搜索”Visual C++ 14.0″选择”MSVC v140 – VS 2015 C++生成工具(v14.00)“:

工具安装好即可。

如果提示LINK : fatal error LNK1158: 无法运行“rc.exe”

请查看此文章:https://www.nixonli.com/?p=106

窗外天空
关注公众号『窗外天空』

获取更多建站运营运维新知!
互联网创业、前沿技术......

赞(0) 打赏
文章名称:《”ERROR: Failed building wheel for Polygon3“ 安装Polygon3时提示错误的解决方法》
文章链接:https://www.nixonli.com/105.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏