I need to download PyQt5 for a project on my Raspberry Pi 5. I opened a Virtualenv and downloaded other libraries. But I got the following error when downloading PyQt5.

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting PyQt5
  Using cached PyQt5-5.15.10.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
  ╰─> [26 lines of output]
      pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead
      Traceback (most recent call last):
        File "/home/raspberry/Desktop/TelefonKodlarıV2/telp/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
        File "/home/raspberry/Desktop/TelefonKodlarıV2/telp/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/raspberry/Desktop/TelefonKodlarıV2/telp/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
        File "/tmp/pip-build-env-3kc8rdrm/overlay/lib/python3.11/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
        File "/tmp/pip-build-env-3kc8rdrm/overlay/lib/python3.11/site-packages/sipbuild/abstract_project.py", line 92, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/tmp/pip-build-env-3kc8rdrm/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 587, in setup
        File "/tmp/pip-install-vnmsn5yj/pyqt5_a285333ffb8e401ba9fc713abfad60cd/project.py", line 68, in apply_user_defaults
        File "/tmp/pip-build-env-3kc8rdrm/overlay/lib/python3.11/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
        File "/tmp/pip-build-env-3kc8rdrm/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 237, in apply_user_defaults
        File "/tmp/pip-build-env-3kc8rdrm/overlay/lib/python3.11/site-packages/pyqtbuild/builder.py", line 69, in apply_user_defaults
          raise PyProjectOptionException('qmake',
      [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.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
  • You haven't said how you installed Virtualenv BUT why would you want to when there is a precompiled python3-pyqt5 in apt?
    – Milliways
    Commented Mar 4 at 7:13
  • @Milliways python -m venv telp cd telp` source bin/activate When virtualenv is created, it cannot access Pyqt5 on the system. I need to download it with pip instead. At least that's how I saw it happen.
    – MEnsar55
    Commented Mar 4 at 18:46

1 Answer 1


If you install with the following you will have access to system installed packages and those installed with apt:-

python -m venv --system-site-packages env

Your attempt likely failed because you had no access to dependencies, but you should find no need to use pip (at least for qt5).

  • Thank you! It worked :)
    – MEnsar55
    Commented Mar 8 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.