pyqt/python-qt5

Problem With installation on Windows

Mihawk1303 opened this issue · 0 comments

i have to install LabelImg, a popular image annotation tool for Python. When i try to install one of the dependencies, PyQt5, there is an error.

`C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>python3 -m pip install Pyqt5
Collecting Pyqt5
Using cached PyQt5-5.15.10-cp37-abi3-win_amd64.whl.metadata (2.2 kB)
Collecting PyQt5-sip<13,>=12.13 (from Pyqt5)
Using cached PyQt5_sip-12.13.0.tar.gz (123 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting PyQt5-Qt5>=5.15.2 (from Pyqt5)
Using cached PyQt5_Qt5-5.15.2-py3-none-win_amd64.whl (50.1 MB)
Using cached PyQt5-5.15.10-cp37-abi3-win_amd64.whl (6.8 MB)
Building wheels for collected packages: PyQt5-sip
Building wheel for PyQt5-sip (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for PyQt5-sip (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [183 lines of output]
running bdist_wheel
running build
running build_ext
building 'PyQt5.sip' extension
creating build
creating build\temp.win32-cpython-37
creating build\temp.win32-cpython-37\Release

  build\lib.win32-cpython-37\PyQt5\sip.cp37-win_amd64.pyd : fatal error LNK1120: 147 esterni non risolti
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX86\\x86\\link.exe' failed with exit code 1120
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for PyQt5-sip
Failed to build PyQt5-sip
ERROR: Could not build wheels for PyQt5-sip, which is required to install pyproject.toml-based projects`

First the error was different but now, i try to install Windows SDK to resolve but the error remained. I deleted part of the error message because it Is very long.