0

I have been trying to install PaddleOcr in my system. When I download the requirements.txt, I get an error 'Failed building wheel for lanms-neo' and 'failed building wheel for Polygon3'.

Building wheels for collected packages: lanms-neo, Polygon3
  Building wheel for lanms-neo (pyproject.toml) ... error 
  error: subprocess-exited-with-error 

  × Building wheel for lanms-neo (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-37
      creating build\lib.win-amd64-cpython-37\lanms 
      copying lanms\__init__.py -> build\lib.win-amd64-cpython-37\lanms
      running build_ext
      building 'lanms._C' extension
      creating build\temp.win-amd64-cpython-37
      creating build\temp.win-amd64-cpython-37\Release
      creating build\temp.win-amd64-cpython-37\Release\lanms
      creating build\temp.win-amd64-cpython-37\Release\lanms\csrc
      creating build\temp.win-amd64-cpython-37\Release\lanms\csrc\clipper
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\AppData\Local\Temp\21\pip-install-ns3wdy7t\lanms-ne
o_76a6e5be79b74acdb837af3f1539931e\lanms\csrc -IC:\Users\AppData\Local\Temp\21\pip-build-env-bu0_xz8u\overlay\Lib\site-packages\pybind11\include -IC:\Users\PycharmProjects\BKB_paddleocr\venv\include -IC:\User
s\AppData\Local\Programs\Python\Python37\include -IC:\Users\AppData\Local\Programs\Python\Python37\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include" 
"-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /EHsc /Tplanms/csrc/clipper\c
lipper.cpp /Fobuild\temp.win-amd64-cpython-37\Release\lanms/csrc/clipper\clipper.obj /std:c++latest /EHsc /bigobj
      clipper.cpp
      C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include\cstdlib(12): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lanms-neo
  Building wheel for Polygon3 (setup.py) ... error 
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 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
      creating build\temp.win-amd64-cpython-37
      creating build\temp.win-amd64-cpython-37\Release
      creating build\temp.win-amd64-cpython-37\Release\src
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDEFAULT_STYLE=STYLE_LIST -DWITH_NUMPY=1 -DSYSTEM_WIN32=1 -Isrc -IC:\Us
ers\PycharmProjects\BKB_paddleocr\venv\lib\site-packages\numpy\core\include -IC:\Users\PycharmProjects\BKB_paddleocr\venv\include -IC:\Users\AppData\Local\Programs\Python\Python37\include -IC:\Users
\AppData\Local\Programs\Python\Python37\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\
Tools\MSVC\14.36.32532\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /Tcsrc/PolyUtil.c /Fobuild\temp.win-amd64-cpython-37\Release\src/PolyUtil.obj
      PolyUtil.c
      C:\Users\AppData\Local\Temp\21\pip-install-ns3wdy7t\polygon3_63b618148932419da33a7328a9accebb\src\gpc.h(36): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [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 lanms-neo Polygon3
ERROR: Could not build wheels for lanms-neo, which is required to install pyproject.toml-based projects

I tried installing Visual studio installer for Desktop development with c++ for the building tools but I couldn't solve the error still.

0 Answers0