technical:recipes:pyqt5-in-virtualenv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
technical:recipes:pyqt5-in-virtualenv [2019-05-13 16:01] – created freytechnical:recipes:pyqt5-in-virtualenv [2020-01-06 10:52] (current) – [Setup a virtual environment] anita
Line 18: Line 18:
   - Use ''ldd'' to check that the shared libraries installed by ''pip'' don't have missing dependencies   - Use ''ldd'' to check that the shared libraries installed by ''pip'' don't have missing dependencies
 None of this helped.  In the end, asking the underlying Qt5 library to verbosely log its behavior was the key: None of this helped.  In the end, asking the underlying Qt5 library to verbosely log its behavior was the key:
-<code bash>+<code>
 $ QT_DEBUG_PLUGINS=1 python qt-test.py $ QT_DEBUG_PLUGINS=1 python qt-test.py
    :    :
Line 39: Line 39:
 All code examples were tested on the Caviness cluster. All code examples were tested on the Caviness cluster.
  
-<code bash>+<code>
 $ vpkg_require anaconda/5.2.0:python3 $ vpkg_require anaconda/5.2.0:python3
-$ conda create -p ~/qt-test python==3 pip+$ conda create -p ~/qt-test python=3 pip
    :    :
 $ source activate ~/qt-test $ source activate ~/qt-test
Line 61: Line 61:
 </WRAP> </WRAP>
  
-<code bash>+<code>
 (/home/1001/qt-test) $ mkdir attic src (/home/1001/qt-test) $ mkdir attic src
 (/home/1001/qt-test) $ cd attic (/home/1001/qt-test) $ cd attic
Line 91: Line 91:
 Once SIP is built and installed into the virtualenv, PyQt5 can be handled.  By default the configuration script will enable all PyQt5 sub-modules for which necessary pre-requisite Qt5 libraries and headers are available.  The ''--disable'' flag can be used to prevent any unnecessary sub-modules from being built. Once SIP is built and installed into the virtualenv, PyQt5 can be handled.  By default the configuration script will enable all PyQt5 sub-modules for which necessary pre-requisite Qt5 libraries and headers are available.  The ''--disable'' flag can be used to prevent any unnecessary sub-modules from being built.
  
-<code bash>+<code>
 (/home/1001/qt-test) $ cd ~/qt-test/attic (/home/1001/qt-test) $ cd ~/qt-test/attic
 (/home/1001/qt-test) $ wget 'https://www.riverbankcomputing.com/static/Downloads/PyQt5/5.12.2/PyQt5_gpl-5.12.2.tar.gz' (/home/1001/qt-test) $ wget 'https://www.riverbankcomputing.com/static/Downloads/PyQt5/5.12.2/PyQt5_gpl-5.12.2.tar.gz'
Line 109: Line 109:
 At this point you can test PyQt5 in your virtualenv: At this point you can test PyQt5 in your virtualenv:
  
-<code bash>+<code>
 (/home/1001/qt-test) $ cd ~/qt-test (/home/1001/qt-test) $ cd ~/qt-test
 (/home/1001/qt-test) $ cat >qt-test.py <<EOT (/home/1001/qt-test) $ cat >qt-test.py <<EOT
  • technical/recipes/pyqt5-in-virtualenv.1557777677.txt.gz
  • Last modified: 2019-05-13 16:01
  • by frey