The issue lies in the .whl file creation for PyQt6-sip in Python 3.13. Let me explain the root cause and why this error occurs.
When you run pip install PyQt6 in the terminal, pip starts resolving and installing all the required dependencies of PyQt6, one of which is PyQt6-sip. The installation process typically uses .whl files (binary distribution format for Python packages). If no pre-built .whl file is available for your system and Python version, pip attempts to build the file from source. Unfortunately, with Python 3.13, this build process fails.
Here are the possible reasons for this failure:
- C API Changes: Python 3.13's C API may include changes that break compatibility with extensions or build scripts used by PyQt6-sip.
- Toolchain Updates: New Python versions often require updated versions of build tools like setuptools, wheel, or compilers to handle changes in the Python ecosystem.
- Library Maintainers: The maintainers of PyQt6-sip may not have updated their library yet to support Python 3.13, especially given the complexity of native extensions like this.
To resolve this issue, I recommend using an older Python version (e.g., 3.12.7), which I verified works for this package. Python 3.12 is well-supported by most libraries and avoids the compatibility challenges associated with Python 3.13.