How to use MinGW's gcc compiler when installing Python package using Pip for python 3.12 and higher?
I configured MinGW and distutils so now I can compile extensions using Cython, and it works fine instead of giving error. But the same error shows up when I want to install pip package which does not have a wheel.
I know there is similar question:here but this solution is not valid for python versions higher than 3.12 because of this and there is no \Lib\distutils catalog.
Error I'm getting:
exit code: 1
[5 lines of output]
running bdist_wheel
running build
running build_ext
building 'PyQt6.sip' 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 PyQt6-sip
Failed to build PyQt6-sip
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (PyQt6-sip)
Same error for setuptools cython was solved by passing --compiler=mingw32 and installing compiler
-
1I'm a bit puzzled by the Cython tag - PyQt6 definitely doesn't use Cython.DavidW– DavidW2024年10月31日 08:23:04 +00:00Commented Oct 31, 2024 at 8:23
-
Oh i add this since I have it there and it works while compiling do you suggest removing?xKRISTOFx– xKRISTOFx2024年10月31日 15:00:19 +00:00Commented Oct 31, 2024 at 15:00
-
1Yes I think so. I understand why you added it now after your comment, but the relation seems fairly vagueDavidW– DavidW2024年10月31日 17:44:56 +00:00Commented Oct 31, 2024 at 17:44
lang-py