```bash
pip install -v pyqt5==5.15.4
```
```
Using pip 26.2 from /data/data/com.termux/files/usr/lib/python3.14/site-packages/pip (python 3.14)
Collecting pyqt5==5.15.4
Using cached PyQt5-5.15.4.tar.gz (3.3 MB)
Running command installing build dependencies for pyqt5
Using pip 26.2 from /data/data/com.termux/files/usr/lib/python3.14/site-packages/pip (python 3.14)
Collecting sip<7,>=5.3
Obtaining dependency information for sip<7,>=5.3 from https://files.pythonhosted.org/packages/1e/b0/6d9b419dcb5e156cc11740fdbf461e730f6aaa5ccb473e2e4faa244fa567/sip-6.16.0-py3-none-any.whl.metadata
Using cached sip-6.16.0-py3-none-any.whl.metadata (3.8 kB)
Collecting PyQt-builder<2,>=1.9
Obtaining dependency information for PyQt-builder<2,>=1.9 from https://files.pythonhosted.org/packages/13/e8/3cdb96cd8f7f0bf4113532d5d762324dd6ea3630362ea2169f9075803a2e/pyqt_builder-1.19.1-py3-none-any.whl.metadata
Using cached pyqt_builder-1.19.1-py3-none-any.whl.metadata (1.9 kB)
Collecting packaging>=24.2 (from sip<7,>=5.3)
Obtaining dependency information for packaging>=24.2 from https://files.pythonhosted.org/packages/df/b2/87e62e8c3e2f4b32e5fe99e0b86d576da1312593b39f47d8ceef365e95ed/packaging-26.2-py3-none-any.whl.metadata
Using cached packaging-26.2-py3-none-any.whl.metadata (3.5 kB)
Collecting setuptools>=75.8.1 (from sip<7,>=5.3)
Obtaining dependency information for setuptools>=75.8.1 from https://files.pythonhosted.org/packages/5d/40/e1e72872c6354b306daef1703549e8e83b4d43cfea356311bf722a043752/setuptools-83.0.0-py3-none-any.whl.metadata
Using cached setuptools-83.0.0-py3-none-any.whl.metadata (6.6 kB)
Using cached sip-6.16.0-py3-none-any.whl (3.2 MB)
Using cached pyqt_builder-1.19.1-py3-none-any.whl (5.3 MB)
Using cached packaging-26.2-py3-none-any.whl (100 kB)
Using cached setuptools-83.0.0-py3-none-any.whl (1.0 MB)
Installing collected packages: setuptools, packaging, sip, PyQt-builder
Creating /data/data/com.termux/files/usr/tmp/pip-build-env-gynbcsce/overlay/bin
changing mode of /data/data/com.termux/files/usr/tmp/pip-build-env-gynbcsce/overlay/bin/sip-build to 755
changing mode of /data/data/com.termux/files/usr/tmp/pip-build-env-gynbcsce/overlay/bin/sip-distinfo to 755
changing mode of /data/data/com.termux/files/usr/tmp/pip-build-env-gynbcsce/overlay/bin/sip-install to 755
changing mode of /data/data/com.termux/files/usr/tmp/pip-build-env-gynbcsce/overlay/bin/sip-module to 755
changing mode of /data/data/com.termux/files/usr/tmp/pip-build-env-gynbcsce/overlay/bin/sip-sdist to 755
changing mode of /data/data/com.termux/files/usr/tmp/pip-build-env-gynbcsce/overlay/bin/sip-wheel to 755
changing mode of /data/data/com.termux/files/usr/tmp/pip-build-env-gynbcsce/overlay/bin/pyqt-bundle to 755
changing mode of /data/data/com.termux/files/usr/tmp/pip-build-env-gynbcsce/overlay/bin/pyqt-qt-wheel to 755

Successfully installed PyQt-builder-1.19.1 packaging-26.2 setuptools-83.0.0 sip-6.16.0
Installing build dependencies ... done
Running command Getting requirements to build wheel
Getting requirements to build wheel ... done
Running command Preparing metadata (pyproject.toml)
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
Querying qmake about your Qt installation...
This is the GPL version of PyQt 5.15.4 (licensed under the GNU General Public License) for Python 3.14.6 on android.

Type 'L' to view the license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.
```

on Fairphone 4 LineageOS 23.2 Termux.

How to accept the license, while typing *yes* and <kbd>enter</kbd> does not work?
Aug 3, 11:12am

The issue you're encountering is related to PyQt5's license acceptance prompt during installation on Termux (Android). The prompt expects interactive input (yes/no), but Termux's terminal environment sometimes doesn't handle this correctly, especially with pip's non-interactive mode.


Solutions to Accept the License Automatically

1. Use --no-input or --yes Flag (Not Recommended for PyQt5)

  • Normally, pip install --yes or --no-input would auto-accept licenses, but PyQt5 explicitly blocks this for legal reasons. This won't work here.

2. Pre-Accept the License via Environment Variable

  • PyQt5 respects the PYQT_ACCEPT_LICENSE environment variable. Set it to yes before installing:
    bash
    export PYQT_ACCEPT_LICENSE=yes
    pip install pyqt5==5.15.4
  • If the above doesn't work, try:
    bash
    export PYQT_ACCEPT_LICENSE=GPU
    pip install pyqt5==5.15.4

3. Use yes Command to Pipe Input

  • Forcefully pipe yes to the prompt:
    bash
    yes | pip install pyqt5==5.15.4
  • This may work if the prompt is expecting stdin.

4. Download and Install Manually

  • Download the PyQt5 wheel file manually (e.g., from PyPI) and install it with:
    bash
    pip install PyQt5-5.15.4-*.whl
  • Replace * with the correct wheel filename for your architecture.

5. Use a Different PyQt5 Version

  • Try installing a newer version (e.g., 5.15.9 or 6.x), as some versions handle license acceptance differently:
    bash
    pip install pyqt5==5.15.9

6. Termux-Specific Workaround

  • Termux sometimes struggles with interactive prompts. Try:
    bash
    termux-wake-lock  # Prevent screen from turning off
    pip install pyqt5==5.15.4
  • Or use screen or tmux to ensure the prompt is properly captured.

7. Build from Source with License Flag

  • If building from source, add --confirm-license:
    bash
    pip install pyqt5==5.15.4 --confirm-license

Recommended Approach

Start with Option 2 (PYQT_ACCEPT_LICENSE) or Option 3 (yes | pip install). If those fail, try Option 4 (manual wheel install).


Aug 3, 11:12am

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more