赞
踩
错误信息如下:
Requirement already satisfied: pyreadline3 in c:\python310\lib\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime->cnocr) (3.4.1) Installing collected packages: Polygon3, mpmath, flatbuffers, unidecode, tqdm, torch, sympy, PyYAML, python-dateutil, protobuf, pillow, numpy, multidict , kiwisolver, humanfriendly, fsspec, frozenlist, fonttools, cycler, click, async-timeout, yarl, torchvision, torchmetrics, tensorboardX, shapely, scipy, opencv-python, onnx, lightning-utilities, contourpy, coloredlogs, aiosignal, onnxruntime, matplotlib, aiohttp, pytorch-lightning, cnstd, cnocr DEPRECATION: Polygon3 is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' packa ge is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559 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] NumPy extension not found - disabling support for it! running install C:\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip a nd other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\Polygon 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. hint: See above for output from the failure.
执行该命令:pip install cnocr --use-pep517
命令执行后出现以下问题:
Requirement already satisfied: pyreadline3 in c:\python310\lib\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime->cnocr) (3.4.1) 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-bu ild-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
以上问题未解决,最后我把python3卸载重装(之前是3.10版本,现降低版本后重新安装未出现问题)
如有以上问题解决办法,麻烦给我留言地址,感谢
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。