Installing `PyQt5` package in virtual environment fails consistently
I would like to install the `PyQt5` package in virtual environment for Python 3.7 in PyCharm 2019.3.1, but it fails consistently with the following error messages:
Collecting PyQt5
Using cached https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'error'
Complete output from command /home/ata/source/projects/Test/venv/bin/python /home/ata/source/projects/Test/venv/lib/python3.7/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpjayjaz71:
Traceback (most recent call last):
File "/home/ata/source/projects/Test/venv/lib/python3.7/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/pep517/_in_process.py", line 64, 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 "/home/ata/source/projects/Test/venv/lib/python3.7/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/home/ata/source/projects/Test/venv/lib/python3.7/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/ata/source/projects/Test/venv/lib/python3.7/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/pep517/_in_process.py", line 67, in prepare_metadata_for_build_wheel
config_settings)
File "/home/ata/source/projects/Test/venv/lib/python3.7/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/pep517/_in_process.py", line 95, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/tmp/pip-build-env-iyyoicq0/overlay/lib/python3.7/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/tmp/pip-build-env-iyyoicq0/overlay/lib/python3.7/site-packages/sipbuild/abstract_project.py", line 82, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/tmp/pip-build-env-iyyoicq0/overlay/lib/python3.7/site-packages/sipbuild/project.py", line 387, in setup
self.apply_user_defaults(tool)
File "project.py", line 62, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-iyyoicq0/overlay/lib/python3.7/site-packages/pyqtbuild/project.py", line 86, in apply_user_defaults
super().apply_user_defaults(tool)
File "/tmp/pip-build-env-iyyoicq0/overlay/lib/python3.7/site-packages/sipbuild/project.py", line 202, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/tmp/pip-build-env-iyyoicq0/overlay/lib/python3.7/site-packages/pyqtbuild/builder.py", line 68, in apply_user_defaults
"specify a working qmake or add it to PATH")
sipbuild.pyproject.PyProjectOptionException
----------------------------------------
Command "/home/ata/source/projects/Test/venv/bin/python /home/ata/source/projects/Test/venv/lib/python3.7/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpjayjaz71" failed with error code 1 in /tmp/pycharm-packaging/PyQt5
What is the reason for these errors?
Please sign in to leave a comment.
Hi,
Doesn't look like IDE-related issue. I would suggest following this article: https://intellij-support.jetbrains.com/hc/en-us/articles/360010202240