Error: sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'

Philippe Fremy phil at freehackers.org
Fri Nov 19 21:17:29 GMT 2021


On a fresh Python 3.10 install, pip collects the source package and then 
tries to compile it unsuccessfully on my computer:

(venv) c:\woss\test_py310>python -m pip install pyqtChart
Collecting pyqtChart
   Downloading PyQtChart-5.15.4.tar.gz (69 kB)
      |████████████████████████████████| 69 kB 689 kB/s
   Installing build dependencies ... done

It then proceeds with all source package it can find in the hope of 
meeting the requirement:

...
       raise PyProjectOptionException('qmake',
   sipbuild.pyproject.PyProjectOptionException
   ----------------------------------------
WARNING: Discarding 
https://files.pythonhosted.org/packages/e6/af/dd493297922be2935ae2de34daea818940c4f747a98d09acaaa5e84cd1dd/PyQtChart-5.15.4.tar.gz#sha256=e47750632851e105eabc27fdfa8180989d120b822181e512f6643b3c5c4d8074 
(from https://pypi.org/simple/pyqtchart/) (requires-python:>=3.6). 
Command errored
out with exit status 1: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmp7e1xcavu' Check the logs for 
full command output.
   Downloading PyQtChart-5.15.3.tar.gz (69 kB)
      |████████████████████████████████| 69 kB 848 kB/s
   Installing build dependencies ... done
   Getting requirements to build wheel ... done
   Preparing metadata (pyproject.toml) ... error
   ERROR: Command errored out with exit status 1:
    command: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmpj8ab4lad'
        cwd: 
C:\Users\g582619\AppData\Local\Temp\pip-install-m6ciaf9r\pyqtchart_7bb6262cb26448c7a6676163cbe712b8
   Complete output (27 lines):
   Traceback (most recent call last):
     File 
"c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", 
line 156, in prepare_metadata_for_build_wheel
       hook = backend.prepare_metadata_for_build_wheel
   AttributeError: module 'sipbuild.api' has no attribute 
'prepare_metadata_for_build_wheel'
...
...
     File 
"C:\Users\g582619\AppData\Local\Temp\pip-build-env-03ujehri\overlay\Lib\site-packages\pyqtbuild\builder.py", 
line 67, in apply_user_defaults
       raise PyProjectOptionException('qmake',
   sipbuild.pyproject.PyProjectOptionException
   ----------------------------------------
WARNING: Discarding 
https://files.pythonhosted.org/packages/ba/46/e24db29f1dab6c592d164d5248d29624ba9355a69a4c9813de2558a3a7b7/PyQtChart-5.15.3.tar.gz#sha256=5f54d0689a54e50d4cc6ae1a2672d69fbe0831cc3562b61c6b30f34aee84bccf 
(from https://pypi.org/simple/pyqtchart/) (requires-python:>=3.6). 
Command errored
out with exit status 1: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmpj8ab4lad' Check the logs for 
full command output.
   Downloading PyQtChart-5.15.2.tar.gz (68 kB)
      |████████████████████████████████| 68 kB 592 kB/s
   Installing build dependencies ... done
   Getting requirements to build wheel ... done
   Preparing metadata (pyproject.toml) ... error
   ERROR: Command errored out with exit status 1:
    command: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmpc7fuviwz'
        cwd: 
C:\Users\g582619\AppData\Local\Temp\pip-install-m6ciaf9r\pyqtchart_8c7a53d72a8147cab83a09f02a00cb9c
   Complete output (27 lines):
   Traceback (most recent call last):
     File 
"c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", 
line 156, in prepare_metadata_for_build_wheel
       hook = backend.prepare_metadata_for_build_wheel
   AttributeError: module 'sipbuild.api' has no attribute 
'prepare_metadata_for_build_wheel'

   During handling of the above exception, another exception occurred:

   Traceback (most recent call last):
     File "c:\woss\test_py310\venv\lib\site-pa
...
...
  sipbuild.pyproject.PyProjectOptionException
   ----------------------------------------
WARNING: Discarding 
https://files.pythonhosted.org/packages/23/63/e6b6720be83f3d9a6a547e6de550822bfe3003bfbe0d6ece265bf65887ad/PyQtChart-5.15.2.tar.gz#sha256=93a6212fb4944d8266ec1f1c10c6e857a06ae6ffb55377ebef58c817b629cbf0 
(from https://pypi.org/simple/pyqtchart/) (requires-python:>=3.5). 
Command errored
out with exit status 1: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmpc7fuviwz' Check the logs for 
full command output.
   Downloading PyQtChart-5.15.1.tar.gz (68 kB)
      |████████████████████████████████| 68 kB 614 kB/s
   Installing build dependencies ... done
   Getting requirements to build wheel ... done
   Preparing metadata (pyproject.toml) ... error
   ERROR: Command errored out with exit status 1:
    command: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmpsvocle1u'
        cwd: 
C:\Users\g582619\AppData\Local\Temp\pip-install-m6ciaf9r\pyqtchart_3c874ea1799547a7b60772d5b67176c0
   Complete output (27 lines):
...
...
     File 
"C:\Users\g582619\AppData\Local\Temp\pip-build-env-l0pow87i\overlay\Lib\site-packages\pyqtbuild\builder.py", 
line 67, in apply_user_defaults
       raise PyProjectOptionException('qmake',
   sipbuild.pyproject.PyProjectOptionException
   ----------------------------------------
WARNING: Discarding 
https://files.pythonhosted.org/packages/cf/97/49c7e5774835a97543b9759c617d0ad2bfd2e3e3596e4c2cddf9b38aeee2/PyQtChart-5.15.1.tar.gz#sha256=8d976b3dbfb233fb0123129323c68adb9d3693c945bba1e227e004208f0747bc 
(from https://pypi.org/simple/pyqtchart/) (requires-python:>=3.5). 
Command errored
out with exit status 1: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmpsvocle1u' Check the logs for 
full command output.
   Downloading PyQtChart-5.15.0.tar.gz (68 kB)
      |████████████████████████████████| 68 kB 843 kB/s
   Installing build dependencies ... done
   Getting requirements to build wheel ... done
   Preparing metadata (pyproject.toml) ... error
   ERROR: Command errored out with exit status 1:
    command: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmpaxk7dqwg'
        cwd: 
C:\Users\g582619\AppData\Local\Temp\pip-install-m6ciaf9r\pyqtchart_fd4aa8059e1a48f984ac8fe69c08930d
...
...
   File 
"C:\Users\g582619\AppData\Local\Temp\pip-build-env-lz3njdsy\overlay\Lib\site-packages\pyqtbuild\builder.py", 
line 67, in apply_user_defaults
       raise PyProjectOptionException('qmake',
   sipbuild.pyproject.PyProjectOptionException
   ----------------------------------------
WARNING: Discarding 
https://files.pythonhosted.org/packages/1c/a7/b075cd95d5481306e27643f80372d72f540e65812ed432a8e44f836a21c4/PyQtChart-5.15.0.tar.gz#sha256=796b1a966759c78859d019bbac6b88b8e1c72ffebf65acf2be3cd9f45c756661 
(from https://pypi.org/simple/pyqtchart/) (requires-python:>=3.5). 
Command errored
out with exit status 1: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmpaxk7dqwg' Check the logs for 
full command output.
   Downloading PyQtChart-5.14.0.tar.gz (68 kB)
      |████████████████████████████████| 68 kB 651 kB/s
   Installing build dependencies ... done
   Getting requirements to build wheel ... done
   Preparing metadata (pyproject.toml) ... error
   ERROR: Command errored out with exit status 1:
    command: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmpc5fodp0n'
        cwd: 
C:\Users\g582619\AppData\Local\Temp\pip-install-m6ciaf9r\pyqtchart_ddafc8302a1d43e580904f219290fa44
...
...
WARNING: Discarding 
https://files.pythonhosted.org/packages/c8/6e/08e68bb5c3c64fbb56f1755c0b4748bb82775fa1b7c9fbaa61572eeaa76a/PyQtChart-5.14.0.tar.gz#sha256=f9004861441becab7a4a48e834da14c3976e4c03e5513c93e005d5df36085046 
(from https://pypi.org/simple/pyqtchart/) (requires-python:>=3.5). 
Command errored
out with exit status 1: 'c:\woss\test_py310\venv\Scripts\python.exe' 
'c:\woss\test_py310\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' 
prepare_metadata_for_build_wheel 
'C:\Users\g582619\AppData\Local\Temp\tmpc5fodp0n' Check the logs for 
full command output.
ERROR: Could not find a version that satisfies the requirement pyqtChart 
(from versions: 5.14.0, 5.15.0, 5.15.1, 5.15.2, 5.15.3, 5.15.4)
ERROR: No matching distribution found for pyqtChart

Cheers,

Philippe

Le 18.11.2021 12:18, Phil Thompson a écrit :
> pip ignores anything after the initial .cp36 in the wheel name and so
> will install the current PyQtChart etc. for Python v3.10.
> 
> Phil
> 
> On 17/11/2021 20:58, Philippe Fremy wrote:
>> Hi,
>> 
>> Thanks, it is also what I found on my own. Problem is easy to solve
>> for PyQt5 but other modules don't have Python 3.10 wheel release yet:
>> PyQt3d, PyQtCharts, ...
>> 
>> So, I'll stick to 3.9 in the mean time.
>> 
>> Thanks you so much for your help.
>> 
>> Cheers,
>> 
>> Philippe
>> 
>> Le 17.11.2021 16:32, Benoit Pierre a écrit :
>>> On Wed, Nov 17, 2021 at 2:55 PM Philippe Fremy <phil at freehackers.org>
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> Thanks for helping me. The version of pip is upgraded to the latest
>>>> before running the script, so this is not the source of the error.
>>>> 
>>>> Here is the rest of the inner exception. I did not notice it at
>>>> first
>>>> but it seems to fail because it can not find qmake. Which is
>>>> coherent.
>>>> But it does not explain why the source package was picked up.
>>> 
>>> You're asking for version 5.15.4, but you're using Python 3.10:
>>> there's no compatible wheel for that version of Python (see
>>> https://pypi.org/project/PyQt5/5.15.4/#files). Try 5.15.5 or later.
>>> 
>>> Cheers
>>> 
>>> --
>>> A: Because it destroys the flow of conversation.
>>> Q: Why is top posting dumb?


More information about the PyQt mailing list