I want to create my small GUI app with PyQt6. I've installed PyQt6, but I also have to install PyQt6-tools. So, when I tried to get it, I got this error:
C:\Users\egorl>pip install pyqt6-tools
Collecting pyqt6-tools
Using cached pyqt6_tools-6.1.0.3.2-py3-none-any.whl (29 kB)
Using cached pyqt6_tools-6.0.3.3.2-py3-none-any.whl (29 kB)
Using cached pyqt6_tools-6.0.2.3.2-py3-none-any.whl (29 kB)
Collecting pyqt6==6.0.2
Using cached PyQt6-6.0.2.tar.gz (940 kB)
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:\Users\egorl\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\egorl\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\egorl\AppData\Local\Temp\tmpjhw74rau'
cwd: C:\Users\egorl\AppData\Local\Temp\pip-install-yqby2el1\pyqt6_1bb69b3deb294f56858c9f93a5b67097
Complete output (29 lines):
Traceback (most recent call last):
File "C:\Users\egorl\AppData\Local\Programs\Python\Python310\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:\Users\egorl\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\egorl\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\egorl\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-4moc33ew\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-4moc33ew\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-4moc33ew\overlay\Lib\site-packages\sipbuild\project.py", line 587, in setup
self.apply_user_defaults(tool)
File "C:\Users\egorl\AppData\Local\Temp\pip-install-yqby2el1\pyqt6_1bb69b3deb294f56858c9f93a5b67097\project.py", line 60, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-4moc33ew\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-4moc33ew\overlay\Lib\site-packages\sipbuild\project.py", line 234, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-4moc33ew\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/80/2a/70619beeebc44e0d554beaed5c6687e55d8c284d8f0fa0eeb66372ce15d0/PyQt6-6.0.2.tar.gz#sha256=aab1b58e287cd8c91d7f7b8c4f91d68b8980f07fcd2ad6d9adbf0bb75347fb9a (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'C:\Users\egorl\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\egorl\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\egorl\AppData\Local\Temp\tmpjhw74rau' Check the logs for full command output.
Collecting pyqt6-tools
Using cached pyqt6_tools-6.0.1.3.2-py3-none-any.whl (29 kB)
Collecting pyqt6==6.0.1
Using cached PyQt6-6.0.1.tar.gz (940 kB)
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:\Users\egorl\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\egorl\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\egorl\AppData\Local\Temp\tmpmzbc3d1o'
cwd: C:\Users\egorl\AppData\Local\Temp\pip-install-yqby2el1\pyqt6_271acbd829354c02a24c2e3326134647
Complete output (29 lines):
Traceback (most recent call last):
File "C:\Users\egorl\AppData\Local\Programs\Python\Python310\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:\Users\egorl\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\egorl\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\egorl\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-hk2owijm\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-hk2owijm\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-hk2owijm\overlay\Lib\site-packages\sipbuild\project.py", line 587, in setup
self.apply_user_defaults(tool)
File "C:\Users\egorl\AppData\Local\Temp\pip-install-yqby2el1\pyqt6_271acbd829354c02a24c2e3326134647\project.py", line 61, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-hk2owijm\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-hk2owijm\overlay\Lib\site-packages\sipbuild\project.py", line 234, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\egorl\AppData\Local\Temp\pip-build-env-hk2owijm\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/f9/29/db2cb373ceac78c829def458fdfe72a637ed991d65f4e026997db5f3f200/PyQt6-6.0.1.tar.gz#sha256=313f0f4bf0158e7ce3b892f1ec16b3378e505e0f2458394c1245eb6807695c0d (from https://pypi.org/simple/pyqt6/) (requires-python:>=3.6.1). Command errored out with exit status 1: 'C:\Users\egorl\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\egorl\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\egorl\AppData\Local\Temp\tmpmzbc3d1o' Check the logs for full command output.
ERROR: Cannot install pyqt6-tools==6.0.1.3.2, pyqt6-tools==6.0.2.3.2, pyqt6-tools==6.0.3.3.2 and pyqt6-tools==6.1.0.3.2 because these package versions have conflicting dependencies.
The conflict is caused by:
pyqt6-tools 6.1.0.3.2 depends on pyqt6-plugins<6.1.0.3 and >=6.1.0.2.2
pyqt6-tools 6.0.3.3.2 depends on pyqt6-plugins<6.0.3.3 and >=6.0.3.2.2
pyqt6-tools 6.0.2.3.2 depends on pyqt6==6.0.2
pyqt6-tools 6.0.1.3.2 depends on pyqt6==6.0.1
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
I understand, that there is problem with dependencies, but I don't have any experiance in pip, so I don't know how to solve this problem. OS: Windows 10, python 3.10
Had the same errors with python 3.10, but didnt want to give up and revert to older version 3.9
Installed the designer seperately from https://build-system.fman.io/qt-designer-download
Its a small and quick install.
As suggested by eyllanesc, using python3.9 worked out for me.
<PathToPython3.9>\python.exe -m pip install pyqt6_tools
For those who use Linux (Ubuntu for me) and don't want to revert to Python 3.9 use this method:
Install flatpak if you don't have it sudo apt install flatpak
Add flatpak repo: flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Install Qt Designer: flatpak install flathub io.qt.Designer
AFter installation complete: run designer in terminal.
You can find more on: https://flathub.org/apps/details/io.qt.Designer
Related
I tried installing PyQt5==5.15.6 and this error keeps showing repeatedly:
Collecting PyQt5==5.15.6 (from -r requirements.txt (line 6))
Using cached https://files.pythonhosted.org/packages/3b/27/fd81188a35f37be9b3b4c2db1654d9439d1418823916fe702ac3658c9c41/PyQt5-5.15.6.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\clens\appdata\local\programs\python\python38\python.exe' 'c:\users\clens\appdata\local\programs\python\python38\lib\site-packages\pip_vendor\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\clens\AppData\Local\Temp\tmpf4m7pu7d'
cwd: C:\Users\clens\AppData\Local\Temp\pip-install-71rwmvce\PyQt5
Complete output (31 lines):
Traceback (most recent call last):
File "c:\users\clens\appdata\local\programs\python\python38\lib\site-packages\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 "c:\users\clens\appdata\local\programs\python\python38\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 207, in <module>
main()
File "c:\users\clens\appdata\local\programs\python\python38\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "c:\users\clens\appdata\local\programs\python\python38\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 66, in prepare_metadata_for_build_wheel
return _get_wheel_metadata_from_wheel(backend, metadata_directory,
File "c:\users\clens\appdata\local\programs\python\python38\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 95, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\clens\AppData\Local\Temp\pip-build-env-12b0td49\overlay\Lib\site-packages\sipbuild\api.py", line 46, in build_wheel
project = AbstractProject.bootstrap('wheel',
File "C:\Users\clens\AppData\Local\Temp\pip-build-env-12b0td49\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 87, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\clens\AppData\Local\Temp\pip-build-env-12b0td49\overlay\Lib\site-packages\sipbuild\project.py", line 585, in setup
self.apply_user_defaults(tool)
File "project.py", line 63, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\clens\AppData\Local\Temp\pip-build-env-12b0td49\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\clens\AppData\Local\Temp\pip-build-env-12b0td49\overlay\Lib\site-packages\sipbuild\project.py", line 236, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\clens\AppData\Local\Temp\pip-build-env-12b0td49\overlay\Lib\site-packages\pyqtbuild\builder.py", line 69, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\clens\appdata\local\programs\python\python38\python.exe' 'c:\users\clens\appdata\local\programs\python\python38\lib\site-packages\pip_vendor\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\clens\AppData\Local\Temp\tmpf4m7pu7d' Check the logs for full command output.
I was trying to install requirements file with the command pip install -r requirements.txt but this error keeps coming up
I had the same problem and finally got it working by simply downgrading to Python 3.9.13. It must not be implemented in Python 3.11 yet.
None of the suggested answers in previous threads worked for me (upgrading pip or specifying any pyqt version).
To downgrade Python,
Install virtualenv (pip install virtualenv)
Download a previous Python release on the official website (do not add to path!)
Create a virtualenv using the newly installed Python version: virtualenv path\to\virtualenv -p path\to\new\python.exe
Activate the virtualenv: path\to\virtualenv\Scripts\Activate
Then, reinstall pyqt5 and pyqt5-tools with pip (in this active virtualenv), and it should work.
I'm using Python 3.11. I'm trying to install pyqt6-tools using pip install pyqt6-tools command but the following error is occurred during installation:
C:\Users\Alex>pip install pyqt6-tools Collecting pyqt6-tools Using
cached pyqt6_tools-6.1.0.3.2-py3-none-any.whl (29 kB) Collecting click
Using cached click-8.1.3-py3-none-any.whl (96 kB) Collecting
pyqt6==6.1.0 Using cached PyQt6-6.1.0.tar.gz (946 kB) 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 ╰─> [33 lines of output]
Traceback (most recent call last):
File "C:\Users\Alex\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pep517\in_process_in_process.py",
line 144, 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:\Users\Alex\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py",
line 351, in
main()
File "C:\Users\Alex\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pep517\in_process_in_process.py",
line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Alex\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pep517\in_process_in_process.py",
line 148, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\sipbuild\api.py",
line 46, in build_wheel
project = AbstractProject.bootstrap('wheel',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 87, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\sipbuild\project.py",
line 585, in setup
self.apply_user_defaults(tool)
File "C:\Users\Alex\AppData\Local\Temp\pip-install-m5ab_lv3\pyqt6_b00490afe1cb4b13bf5a1a49acc55f24\project.py",
line 60, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\pyqtbuild\project.py",
line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\sipbuild\project.py",
line 236, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-2mc4erbo\overlay\Lib\site-packages\pyqtbuild\builder.py",
line 69, 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. ╰─> See above
for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
How can I fix it?
It looks like this is might be a sort of bug, but really more that there isn't an installer yet for your version of python and OS.
You can either try installing an older version of Python, some version of 3.10 would probably do. Or you can try one of the workarounds detailed in the bug report that people have claimed to successfully have used in the github repo
The link directs you to instructions for PyQt5, but if you scroll down you will see people claiming that the same process works for PyQt6 and there are specific wheel files you can download.
Downloading when I downloaded Pyqt5. But when I try to download Pyqt5-Tools, I'm getting an error.
I using Windows 11
When using Windows 10, it was easily downloaded. But Windows 11 has not been installed after installing.
pip install pyqt5-toolsCollecting pyqt5-toolsUsing cached pyqt5_tools-5.15.4.3.2-py3-none-any.whl (29 kB)Requirement already satisfied: click in c:\users\imran\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from pyqt5-tools) (8.1.2)Using cached pyqt5_tools-5.15.4.3.1-py3-none-any.whl (28 kB)Using cached pyqt5_tools-5.15.4.3.0.3-py3-none-any.whl (28 kB)Using cached pyqt5_tools-5.15.3.3.2-py3-none-any.whl (29 kB)Using cached pyqt5_tools-5.15.3.3.1-py3-none-any.whl (28 kB)Collecting pyqt5==5.15.3Using cached PyQt5-5.15.3.tar.gz (3.3 MB)Installing build dependencies ... doneGetting requirements to build wheel ... donePreparing metadata (pyproject.toml) ... errorerror: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.│ exit code: 1╰─> [29 lines of output]Traceback (most recent call last):File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 156, in prepare_metadata_for_build_wheelhook = backend.prepare_metadata_for_build_wheelAttributeError: 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:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\imran\AppData\Local\Temp\pip-build-env-mym69u8_\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Users\imran\AppData\Local\Temp\pip-build-env-mym69u8_\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\imran\AppData\Local\Temp\pip-build-env-mym69u8_\overlay\Lib\site-packages\sipbuild\project.py", line 594, in setup
self.apply_user_defaults(tool)
File "C:\Users\imran\AppData\Local\Temp\pip-install-ebfgqguq\pyqt5_e2d6632ee7174ad58d61d88e0ddffdcd\project.py", line 63, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\imran\AppData\Local\Temp\pip-build-env-mym69u8_\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\imran\AppData\Local\Temp\pip-build-env-mym69u8_\overlay\Lib\site-packages\sipbuild\project.py", line 241, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\imran\AppData\Local\Temp\pip-build-env-mym69u8_\overlay\Lib\site-packages\pyqtbuild\builder.py", 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.╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.hint: See above for details.
I had the same problem here.
I had the Python 3.10 installed, but I found out that PyQt5 is not supported on the 3.10 version of Python. You can check this info here.
So I downgraded my Python version and everything worked fine.
I am trying to install PyQt6, in my cmd, when I run pip install pyqt6 its just works fine but when I try to install pip install pyqt-tools its shows this error:
C:\Users\lenovo>pip install pyqt6-tools
Collecting pyqt6-tools
Using cached pyqt6_tools-6.1.0.3.2-py3-none-any.whl (29 kB)
Collecting python-dotenv
Using cached python_dotenv-0.19.2-py2.py3-none-any.whl (17 kB)
Collecting pyqt6==6.1.0
Using cached PyQt6-6.1.0.tar.gz (946 kB)
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
╰─> [29 lines of output]
Traceback (most recent call last):
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python310\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:\Users\lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\sipbuild\project.py", line 594, in setup
self.apply_user_defaults(tool)
File "C:\Users\lenovo\AppData\Local\Temp\pip-install-4y93vt9z\pyqt6_e010daa9e104413b87d1d41abf25351d\project.py", line 60, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\sipbuild\project.py", line 241, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\lenovo\AppData\Local\Temp\pip-build-env-omd2bkc3\overlay\Lib\site-packages\pyqtbuild\builder.py", 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.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I'm on 22.0.3 pip version and 3.10 python version
It seems like Qt6 needs to be installed on the OS before python package:
brew install pyqt5
export PATH="/opt/homebrew/opt/qt5/bin:$PATH"
The path update is the key as the builder is not finding something that the qmake needs.
This is the command line that I used to install my PyQt5-tools from the pip
C:\WINDOWS\system32>pip install PyQt5-tools
After the command line is inserted into my command prompt
These messages and errors were returned
Collecting PyQt5-tools
Using cached pyqt5_tools-5.15.4.3.2-py3-none-any.whl (29 kB)
Using cached pyqt5_tools-5.15.4.3.1-py3-none-any.whl (28 kB)
Using cached pyqt5_tools-5.15.4.3.0.3-py3-none-any.whl (28 kB)
Using cached pyqt5_tools-5.15.3.3.2-py3-none-any.whl (29 kB)
Collecting pyqt5==5.15.3
Using cached PyQt5-5.15.3.tar.gz (3.3 MB)
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:\Users\Legion\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\Legion\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Legion\AppData\Local\Temp\tmp8airx5rn'
cwd: C:\Users\Legion\AppData\Local\Temp\pip-install-i87e0y1q\pyqt5_fde282425e8e4e089b79c62a0b021979
Complete output (29 lines):
Traceback (most recent call last):
File "C:\Users\Legion\AppData\Local\Programs\Python\Python310\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:\Users\Legion\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\Legion\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\Legion\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\Legion\AppData\Local\Temp\pip-build-env-m1wogts2\overlay\Lib\site-packages\sipbuild\api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "C:\Users\Legion\AppData\Local\Temp\pip-build-env-m1wogts2\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\Legion\AppData\Local\Temp\pip-build-env-m1wogts2\overlay\Lib\site-packages\sipbuild\project.py", line 587, in setup
self.apply_user_defaults(tool)
File "C:\Users\Legion\AppData\Local\Temp\pip-install-i87e0y1q\pyqt5_fde282425e8e4e089b79c62a0b021979\project.py", line 63, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\Legion\AppData\Local\Temp\pip-build-env-m1wogts2\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\Legion\AppData\Local\Temp\pip-build-env-m1wogts2\overlay\Lib\site-packages\sipbuild\project.py", line 234, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\Legion\AppData\Local\Temp\pip-build-env-m1wogts2\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/6e/86/d715e71771cece0e060f2ebab20f3ded067b08a0927dfb3143530cae8098/PyQt5-5.15.3.tar.gz#sha256=965ba50e7029b37f218a54ace24e87c77db3e5a9f0b83baeb21fb57b4154b838 (from https://pypi.org/simple/pyqt5/) (requires-python:>=3.6). Command errored out with exit status 1: 'C:\Users\Legion\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\Legion\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Legion\AppData\Local\Temp\tmp8airx5rn' Check the logs for full command output.
What should I do to fix the error stated above.
Thank you.