Skip to main content

Another unofficial Qt installer

Project description

  • Release: pypi

  • Documentation: docs

  • Test status: gha and Coverage: coveralls

This is a utility alternative to the official graphical Qt installer, for using in CI environment where an interactive UI is not usable such as Github Actions, Travis-CI, CircleCI, Azure-Pipelines, AppVeyor and others.

It can automatically download prebuilt Qt binaries for any target (you’re not bound to Linux binaries on Linux; you could also download iOS binaries). It’s working with Python >= 3.6 on Linux, macOS and Windows.

When installing QtBase package on proper platforms (eg. install linux package on linux), aqt update Qt binaries(eg. qmake, and libQt5Core.so/Qt5Core.dll/Framework.QtCore for Qt<5.14), and change configurations(eg. qt.conf, and qconfig.pri) to make it working well with installed directory(Qt prefix).

The aqtinstall does not update PATH environment variable.

Requirements

  • Minimum Python version: 3.6

  • Recommended Python version: 3.8, 3.9 (frequently tested on)

  • Dependent libraries: requests, py7zr

Documentation

There are two versions of documentation:

Install

Same as usual, it can be installed with pip

pip install -U pip
pip install aqtinstall

You are recommended to update pip before installing aqtinstall.

Usage(as in v1.2.x)

General usage looks like this:

aqt [-h][--help][-O | --outputdir <directory>][-b | --base <mirror url>][-E | --external <7zip command>] \
    install <qt-version> <host> <target> [<arch>] [-m all | -m [extra module] [extra module]...] [--internal]
    [--archives <archive>[ <archive>...]] [--timeout <timeout(sec)>]

You can also call with python -m aqt syntax as well as command script aqt.

  • The Qt version is formatted like this: 5.11.3

  • Host is one of: linux, mac, windows

  • Target is one of: desktop, android, ios (iOS only works with mac host)

  • For some platforms you also need to specify an arch:
    • For windows, choose one of:
      • win64_msvc2019_64, win32_msvc2019,

      • win64_msvc2017_64, win32_msvc2017,

      • win64_msvc2015_64, win32_msvc2015,

      • win64_mingw81, win32_mingw81,

      • win64_mingw73, win32_mingw73,

      • win64_mingw53, win32_mingw53,

      • win64_msvc2019_winrt_x64, win64_msvc2019_winrt_x86, win64_msvc2019_winrt_armv7

      • win64_msvc2017_winrt_x64, win64_msvc2017_winrt_x86, win64_msvc2017_winrt_armv7

    • For android and Qt 6 or Qt 5.13 and below, choose one of: android_x86_64, android_arm64_v8a, android_x86, android_armv7

  • You can specify external 7zip command path instead of built-in extractor.

  • When specifying all for extra modules option -m all extra modules are installed.

Installing tool and utility (Experimental)

You can install tools and utilities using following syntax;

aqt [-h][--help][-O | --outputdir <directory>][-b | --base <mirror url>][-E <7zip command>] \
    tool <host> <tool_name> <tool-version> <arch> [--timeout <timeout>]
  • tool_name is one of tools_ifw, tools_vcredist, and tools_openssl.

  • arch is full qualified tool name such as qt.tools.ifw.31 which values can be seen on Qt archive_site This is a quite experimental feature, may not work and please use it with your understanding what you are doing.

  • It does not recognize ‘installscript.qs’. When using tools which depends on a qt script, you should do something by yourself.

Target directory

aqt can take option ‘–outputdir’ or ‘-O’ that specify a target directory.

The Qt packages are installed under current directory as such Qt/<ver>/gcc_64/

If you want to install it in C:Qt as same as standard gui installer default, run such as follows(on Windows):

cd c:\
mkdir Qt
py -m aqt install --outputdir c:\Qt 5.15.2 windows desktop win64_msvc2019_64

If you want to install it in /opt/Qt as same as standard gui installer default, run such as follows(on mac/linux):

sudo mkdir /opt/Qt
sudo python -m aqt install --outputdir /opt/Qt 5.15.2 linux desktop gcc_64

Command examples

Example: Installing Qt SDK 5.12.0 for Linux with QtCharts and QtNetworkAuth:

pip install aqtinstall
aqt install --outputdir /opt/Qt 5.12.0 linux desktop -m qtcharts qtnetworkauth

Example: Installing Android (armv7) Qt 5.10.2:

aqt install 5.10.2 linux android android_armv7

Example: Installing Android Qt 5.15.2:

aqt install 5.15.2 linux android android

Example: Install examples, doc and source:

py -m aqt examples 5.15.0 windows desktop -m qtcharts qtnetworkauth
py -m aqt doc 5.15.0 windows desktop -m qtcharts qtnetworkauth
py -m aqt src 5.15.0 windows desktop

Example: Install Web Assembly for Qt5

aqt install 5.15.0 linux desktop wasm_32

Example: Install an Install FrameWork (IFW):

aqt tool linux desktop tools_ifw

Example: Install vcredist:

py -m aqt tool windows desktop tools_vcredist
.\Qt\Tools\vcredist\vcredist_msvc2019_x64.exe /norestart /q

Example: Install MinGW on Windows

py -m aqt tool -O c:\Qt windows desktop tools_mingw qt.tools.win64_mingw810
set PATH=C:\Qt\Tools\mingw810_64\bin

Example: Install Qt6 for android

aqt install -O qt 6.1.0 linux desktop
aqt install -O qt 6.1.0 linux android android_armv7
qt/6.1.0/android_armv7/bin/qmake -query

Example: Install Qt6 for ios/mac

aqt install -O qt 6.1.0 mac desktop
aqt install -O qt 6.1.0 mac ios ios
qt/6.1.0/ios/bin/qmake -query

Example: Show help message

aqt help

Environment Variables

It is users task to set some environment variables to fit your platform such as

export PATH=/path/to/qt/x.x.x/clang_64/bin/:$PATH
export QT_PLUGIN_PATH=/path/to/qt/x.x.x/clang_64/plugins/
export QML_IMPORT_PATH=/path/to/qt/x.x.x/clang_64/qml/
export QML2_IMPORT_PATH=/path/to/qt/x.x.x/clang_64/qml/

aqtinstall never do it for you because not to break multiple installation versions.

Supported CI platforms

There are no limitation for CI platform but currently it is tested on Azure Pipelines and Github actions. If you want to use it with Github actions, install_qt action will help you. If you want to use it with Azure Pipelines, blog article Using Azure DevOps Pipelines with Qt may be informative.

(Advanced) Force dependency

(Here is a note for advanced user who knows python/pip well.)

When you have a trouble on your (minor) platform to install aqtinstall’s dependency, you can force dependencies and its versions (not recommended for ordinary use). You can run pip to install individual dependencies in manual and install aqtinstall with –no-deps.

Example:

Avoid installation of py7zr, python 7zip library, and force using external 7z command to extract archives.

pip install -U pip
pip install requests==2.25.1 semantic_version texttable
pip install --no-deps aqtinstall
python -m aqt --external /usr/local/bin/7z install 5.15.2 linux desktop

Testimonies

Some projects utilize aqtinstall.

Media, slide, articles and discussions

History

This program is originally shown in Kaidan project as a name qli-installer. A project aqtinstall extend the original to run with standard python features with Linux, Mac and Windows, to be tested on CI platform, and to improve performance with a concurrent downloading.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aqtinstall-2.0.0b5.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aqtinstall-2.0.0b5-py2.py3-none-any.whl (45.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file aqtinstall-2.0.0b5.tar.gz.

File metadata

  • Download URL: aqtinstall-2.0.0b5.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for aqtinstall-2.0.0b5.tar.gz
Algorithm Hash digest
SHA256 a0e6e99926a659f3716220f9428daa1c97265fc0eef7f77c04609e1f082aa03a
MD5 9fb2373daf70a44421864c11b2347267
BLAKE2b-256 b4ae8c43a8029def564a98e95a1bb4b17375a5198f52b3b57d8727ff39f7cfeb

See more details on using hashes here.

File details

Details for the file aqtinstall-2.0.0b5-py2.py3-none-any.whl.

File metadata

  • Download URL: aqtinstall-2.0.0b5-py2.py3-none-any.whl
  • Upload date:
  • Size: 45.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for aqtinstall-2.0.0b5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 12302ff00ea92a71d67624bc81d13f60be09acb51d5a6b2dc07863c7296562b3
MD5 4250e3c2185dbe5ef7f00f0418ebb084
BLAKE2b-256 e2d0647b1764f6fe23a94f2ee35a96c0ba57c22bb857d04ca1b72517e1d1632f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page