• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

1

29.1K
Views
Error installing pytq5: Preparing metadata (pyproject.toml) did not run successfully

I try to install pytq5 with pip and get this error

$ python3 -m pip install PyQt5
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
  ╰─> [29 lines of output]
      Traceback (most recent call last):
        File "/Users/olivierskonieczny/Desktop/app/python/ObjectDetection/envs/lib/python3.9/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 "/Users/olivierskonieczny/Desktop/app/python/ObjectDetection/envs/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        ...
        ...
        ...
      [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 still can install other packages like lxml but can't install pytq5. I'm installing everything in virtual environment.

about 3 years ago · Santiago Trujillo
8 answers
Answer question

0

I faced the same problem these days. When you have a look at PyPi download site, you can read in the Installation chapter that you need "Qt's qmake tool on PATH". After installing Qt's development files everything worked fine for me. So first install it and make sure it's on your PATH and than try again.

sudo apt-get install qtbase5-dev
pip install pyqt5

PS: I think it has nothing to do with your python or pip version. I tried many versions and had this problem every time. It's just missing, corrupted or not found header development files from qt5.

Regards, Vali

about 3 years ago · Santiago Trujillo Report

0

about 1 year ago · Minerva Katherine Ramos Suarez Report

1

MacOS-specific answer

You need to have Qt5 installed in the system, and you need to have its qmake in PATH.

To install Qt5, you can either run brew install qt5 or download the installer from https://www.qt.io/download-qt-installer.

Note that if you choose to use the installer, it will require you to log in to or create a qt.io account to perform the installation.

If you have an older version of MacOS, you can download older installers from https://download.qt.io/archive/qt/. You can check which version supports your OS version in https://doc.qt.io/archives/qt-5.14/supported-platforms.html, where you can swap out qt-5.14 in the url for whichever version you are interested in.

After the installation, find where qmake is located. For me using the installer for 5.14.2 it was in /Users/Admin/Qt5.14.2/5.14.2/clang_64/bin. You need to add this to the PATH environment variable. To do so edit .bash_profile in your home folder (may need to press Command + Shift + . first to see dotfiles in Finder) and add to it something the following:

export PATH="$PATH:/Users/Admin/Qt5.14.2/5.14.2/clang_64/bin"

Now, upon launching a new terminal, you should be able to type qmake and see its help text be outputted. Installing PyQt5 should now succeed (provided the Qt5 version you installed supports your MacOS version).

about 3 years ago · Santiago Trujillo Report

1

Install and uninstall

over 2 years ago · Oscar Caicedo Report

1

If you are encountering an error while installing pyqt5 with pip, it is likely that there is a problem with the installation process. Some common reasons for this error include:

  1. The pyqt5 package is not available on PyPI, the Python Package Index. This can happen if the package has been removed, or if it has never been uploaded to PyPI. In this case, you will need to install pyqt5 from a different source, such as the official PyQt5 website or a third-party package repository.

  2. There is a problem with your pip installation. This can happen if pip is not installed correctly, or if it is outdated. In this case, you may need to upgrade pip or reinstall it to fix the problem.

  3. There is a problem with your Python installation. This can happen if Python is not installed correctly, or if it is an older version that is not compatible with pyqt5. In this case, you may need to upgrade or reinstall Python to fix the problem.

If you continue to encounter problems while installing pyqt5, it is recommended that you seek assistance from the pyqt5 community or from a qualified Python developer. They will be able to provide further guidance and help you troubleshoot the issue.

over 2 years ago · Juan Pablo Isaza Report

1

I got the same error and fixed it by simply uninstalling 3.10 and installing 3.9. x2

over 1 year ago · brandon alexander mendieta suarez Report

1

This could be caused by an incompatibility in the version of PyQt5 that is being released and the version of Python that you have in your virtual environment.

Study

Sorry for the difficulty you are experiencing installing PyQt5 touch. There seems to be a problem with the generation of package metadata.

This could be caused by an incompatibility in the version of PyQt5 that is being released and the version of Python that you have in your virtual environment.

To resolve this issue, I would recommend you try the following:

  1. Make sure you have the latest version of pip-almazación. You can run the following command in your terminal:

     python3 -m pip install --upgrade pip
    

    Try PyQt5 using the --no-cache-dir option for cache issues. Run the following command:

     python3 -m pip install --no-cache-dir PyQt5
    

    If that's the problem, you can try specifying a specific version of PyQt5 that is compatible with the version of Python you have in your virtual environment. For example, if you are using Python 3.9, you can install all PyQt5 version 5.15.4 following the command:

     python3 -m pip install --no-cache-dir PyQt5==5.15.4
    

Hoping that these steps help you solve the problem and that PyQt5 can be installed successfully

about 1 year ago · Minerva Katherine Ramos Suarez Report

-1

I got that same error and I fixed it just by uninstalling 3.10 and installing 3.9.

about 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error