title: MetaData Generation Failed while installing PyQt5
body: <p>I have a similar problem as <a href="https://stackoverflow.com/questions/65447314/attributeerror-module-sipbuild-api-has-no-attribute-prepare-metadata-for-bui">AttributeError: module &#39;sipbuild.api&#39; has no attribute &#39;prepare_metadata_for_build_wheel&#39; for PyQt5 5.15.0</a>. Most of the solutions proposed there is to install the latest version of pip. But I have the latest pip version (22.0.2) and it is still not working. I am trying to install it in MacOS 12.1, python version 3.8.9.</p>
  <p>Command Output:</p>
  <pre><code>Collecting PyQt5
    Using cached PyQt5-5.15.6.tar.gz (3.2 MB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing metadata (pyproject.toml) ... error
    error: subprocess-exited-with-error
    
    × Preparing metadata (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─&gt; [29 lines of output]
        Traceback (most recent call last):
          File &quot;/Users/ashuadhikari/Library/Python/3.8/lib/python/site-packages/pip/_vendor/pep517/in_process/_in_process.py&quot;, 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 &quot;/Users/ashuadhikari/Library/Python/3.8/lib/python/site-packages/pip/_vendor/pep517/in_process/_in_process.py&quot;, line 363, in &lt;module&gt;
        main()
      File &quot;/Users/ashuadhikari/Library/Python/3.8/lib/python/site-packages/pip/_vendor/pep517/in_process/_in_process.py&quot;, line 345, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File &quot;/Users/ashuadhikari/Library/Python/3.8/lib/python/site-packages/pip/_vendor/pep517/in_process/_in_process.py&quot;, line 160, in prepare_metadata_for_build_wheel
        whl_basename = backend.build_wheel(metadata_directory, config_settings)
      File &quot;/private/var/folders/2_/r0h48ntn7x9dz67r08nh7rv80000gn/T/pip-build-env-tp6yyadf/overlay/lib/python3.8/site-packages/sipbuild/api.py&quot;, line 51, in build_wheel
        project = AbstractProject.bootstrap('pep517')
      File &quot;/private/var/folders/2_/r0h48ntn7x9dz67r08nh7rv80000gn/T/pip-build-env-tp6yyadf/overlay/lib/python3.8/site-packages/sipbuild/abstract_project.py&quot;, line 83, in bootstrap
        project.setup(pyproject, tool, tool_description)
      File &quot;/private/var/folders/2_/r0h48ntn7x9dz67r08nh7rv80000gn/T/pip-build-env-tp6yyadf/overlay/lib/python3.8/site-packages/sipbuild/project.py&quot;, line 587, in setup
        self.apply_user_defaults(tool)
      File &quot;project.py&quot;, line 63, in apply_user_defaults
        super().apply_user_defaults(tool)
      File &quot;/private/var/folders/2_/r0h48ntn7x9dz67r08nh7rv80000gn/T/pip-build-env-tp6yyadf/overlay/lib/python3.8/site-packages/pyqtbuild/project.py&quot;, line 70, in apply_user_defaults
        super().apply_user_defaults(tool)
      File &quot;/private/var/folders/2_/r0h48ntn7x9dz67r08nh7rv80000gn/T/pip-build-env-tp6yyadf/overlay/lib/python3.8/site-packages/sipbuild/project.py&quot;, line 234, in apply_user_defaults
        self.builder.apply_user_defaults(tool)
      File &quot;/private/var/folders/2_/r0h48ntn7x9dz67r08nh7rv80000gn/T/pip-build-env-tp6yyadf/overlay/lib/python3.8/site-packages/pyqtbuild/builder.py&quot;, line 67, in apply_user_defaults
        raise PyProjectOptionException('qmake',
    sipbuild.pyproject.PyProjectOptionException
    [end of output]
  
  
  
   note: This error originates from a subprocess, and is likely not a problem with pip.
  error: metadata-generation-failed
  
  × Encountered error while generating package metadata.
  ╰─&gt; See above for output.
  
  note: This is an issue with the package mentioned above, not pip.
  hint: See above for details.
  </code></pre>
  <p>Note: Installing PyQt5 with brew worked but brew installed the latest python version as a dependency and I want to install PyQt5 inside my venv.</p>