Skip to content

Instantly share code, notes, and snippets.

@timsueberkrueb
Last active November 15, 2023 16:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timsueberkrueb/8588ac089000858cdf433fa8b6f92e15 to your computer and use it in GitHub Desktop.
Save timsueberkrueb/8588ac089000858cdf433fa8b6f92e15 to your computer and use it in GitHub Desktop.
Building PySide2 on Ubuntu

Tested on Ubuntu 16.10

Clone the pyside-setup repository and init submodules

git clone https://code.qt.io/pyside/pyside-setup.git
cd pyside-setup
git submodule update --init --recursive

Install dependencies:

sudo apt-get install build-essential git cmake qt5-default libxml2 libxslt1.1 python3-dev qtbase5-dev

If you plan to use the default Qt system installation:

sudo apt-get install qttools5-dev-tools libqt5clucene5 libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5designer5 libqt5designercomponents5 libqt5feedback5 libqt5gui5 libqt5help5 libqt5multimedia5 libqt5network5 libqt5opengl5 libqt5opengl5-dev libqt5organizer5 libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5quickwidgets5 libqt5script5 libqt5scripttools5 libqt5sql5 libqt5sql5-sqlite libqt5svg5 libqt5test5 libqt5webkit5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 libqt5xmlpatterns5-dev 

Build and install:

python3 setup.py install --ignore-git --build-tests --qmake=<path-to-qmake> --cmake=/usr/bin/cmake

For example:

python3 setup.py install --ignore-git --qmake=/home/you/Qt/5.7/gcc_64/bin/qmake --cmake=/usr/bin/cmake

Refer to PySide 2 on Qt Wiki for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment