Advanced: Installing PyQt6 System Dependencies on Older Linux - Ktiseos-Nyx/Dataset-Tools GitHub Wiki

Advanced: Installing PyQt6 System Dependencies on Older Linux

This section is for users on older Debian/Ubuntu-based Linux distributions, or other Linux systems, who encounter errors when trying to install Dataset-Tools' dependencies, specifically related to PyQt6 failing to build or install. This usually happens if the necessary Qt6 development libraries and tools are missing from your system.


1. Attempt Standard Installation First

Before proceeding with these steps, ensure you have followed the main "Installation and Usage" guide, including setting up a virtual environment and attempting:

pip install .

** OR **

uv pip install .

If this command fails with errors pointing to PyQt6, Qt6, or qmake, continue below.

2. Install Qt6 Development System Packages

On Debian/Ubuntu-based systems, you'll need to install the Qt6 development packages. Open your terminal and run:

A.** Update Package List:**

  • First, refresh your system's package list:
sudo apt update

B. ** Install Qt6 Development Tools (Recommended Method):**

These packages provide the necessary headers, libraries, and tools (like qmake) for building software that uses Qt6, which pip needs for PyQt6.

sudo apt install qt6-base-dev qt6-tools-dev

C. Alternative Method (If Method B Fails or Packages Not Found):

In some cases, a more general Qt6 package might be available or necessary:

sudo apt install qt6-default

3. Retry Python Dependency Installation

After successfully installing the Qt6 system packages, go back to your activated virtual environment and try installing the Python dependencies for Dataset-Tools again:

pip install .

or

uv pip install .

This should now hopefully find the required Qt6 components and install PyQt6 successfully.

4. Troubleshooting qmake Issues (If pip Still Fails)

If pip still fails and the error messages mention qmake or qt6-qmake cannot be found, it means the Python build process for PyQt6 isn't locating this crucial Qt build tool.

A. Verify qmake Installation:

Check if qmake for Qt6 was installed and is available in your system's search path:

which qt6-qmake
  • If a path is returned (e.g., /usr/bin/qt6-qmake or /usr/lib/qt6/bin/qmake): The tool is installed.
  • If no path is returned ("not found"): The Qt6 development packages (Step 2) may not have installed correctly, or qmake might have a different name on your distribution. Double-check the installation from Step 2.

B. Making qmake Accessible (If Found but pip Fails):

If which finds qmake but pip still can't, the directory containing qmake might not be in the PATH environment variable that pip's build process is using.

[!NOTE]
Note the directory from the which command (e.g., if which qt6-qmake gives /usr/lib/qt6/bin/qt6-qmake, the directory is /usr/lib/qt6/bin).

You can temporarily add this directory to your PATH for the current terminal session:

export PATH="<directory_from_which_command>:$PATH"

For example:

export PATH="/usr/lib/qt6/bin:$PATH"
  • Important: Replace <directory_from_which_command> with the actual directory.

  • After updating the PATH, try the pip install . command again in the same terminal.

  • A simpler step that sometimes helps is to close and reopen your terminal after installing system packages, as this can refresh the environment, including PATH.

[!NOTE]
Please copy and paste commands carefully, one at a time. If problems persist after following these steps, please open an issue on our GitHub repository, providing details about your Linux distribution, the steps you tried, and any error messages.