conda-forge / pyqt-feedstock

A conda-smithy repository for pyqt.
BSD 3-Clause "New" or "Revised" License
5 stars 36 forks source link

Could not load the Qt platform plugin "xcb" #112

Closed guyer closed 2 years ago

guyer commented 2 years ago

Solution to issue cannot be found in the documentation.

Issue

Since the release of pyqt 5.15.4, our CI suite is failing on linux with

QFactoryLoader::QFactoryLoader() checking directory path "/usr/share/miniconda/envs/myEnvironment/bin/platforms" ...
Cannot load library /usr/share/miniconda/envs/myEnvironment/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/usr/share/miniconda/envs/myEnvironment/plugins/platforms/libqxcb.so" : "Cannot load library /usr/share/miniconda/envs/myEnvironment/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, webgl, xcb.

Earlier the same day, with pyqt 5.12.3, there was no problem.

We don't require or import pyqt directly, but through mayavi and tvtk.

See usnistgov/fipy#862 for more diagnostics.

Installed packages

# packages in environment at /usr/share/miniconda/envs/myEnvironment:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
alsa-lib                  1.2.3.2              h166bdaf_0    conda-forge
aom                       3.3.0                h27087fc_1    conda-forge
apptools                  5.1.0              pyh44b312d_0    conda-forge
attr                      2.5.1                h166bdaf_0    conda-forge
brotli                    1.0.9                h166bdaf_7    conda-forge
brotli-bin                1.0.9                h166bdaf_7    conda-forge
brotlipy                  0.7.0           py310h5764c6d_1004    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.18.1               h7f98852_0    conda-forge
ca-certificates           2021.10.8            ha878542_0    conda-forge
certifi                   2021.10.8       py310hff52083_2    conda-forge
cffi                      1.15.0          py310h0fdd8cc_0    conda-forge
charset-normalizer        2.0.12             pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
conda                     4.12.0          py310hff52083_0    conda-forge
conda-package-handling    1.8.1           py310h5764c6d_1    conda-forge
configobj                 5.0.6                      py_0    conda-forge
cryptography              36.0.2          py310h597c629_1    conda-forge
curl                      7.83.1               h7bff187_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
dbus                      1.13.6               h5008d03_3    conda-forge
double-conversion         3.2.0                h9c3ff4c_0    conda-forge
eigen                     3.4.0                h4bd325d_0    conda-forge
elfutils                  0.186                he364ef2_0    conda-forge
envisage                  6.0.1              pyhd8ed1ab_0    conda-forge
expat                     2.4.8                h27087fc_0    conda-forge
ffmpeg                    4.4.1                h594f047_3    conda-forge
fftw                      3.3.10          mpi_mpich_h8b92f0a_2    conda-forge
fltk                      1.3.8                h83e168f_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.0               h8e229c2_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.33.3          py310h5764c6d_0    conda-forge
freeimage                 3.18.0               hf18588b_8    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
future                    0.18.2          py310hff52083_5    conda-forge
gettext                   0.19.8.1          h73d1719_1008    conda-forge
giflib                    5.2.1                h36c2ea0_2    conda-forge
gl2ps                     1.4.2                h0708190_0    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
gmsh                      4.10.1               hee323ce_0    conda-forge
gnutls                    3.6.13               h85f3911_1    conda-forge
gst-plugins-base          1.20.2               hcf0ee16_0    conda-forge
gstreamer                 1.20.2               hd4edc92_0    conda-forge
hdf4                      4.2.15               h10796ff_3    conda-forge
hdf5                      1.12.1          nompi_h2386368_104    conda-forge
hypre                     2.24.0          mpi_mpich_h0faba72_0    conda-forge
icu                       70.1                 h27087fc_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
imath                     3.1.5                h6239696_0    conda-forge
importlib-metadata        4.11.3          py310hff52083_1    conda-forge
importlib_metadata        4.11.3               hd8ed1ab_1    conda-forge
importlib_resources       5.7.1              pyhd8ed1ab_0    conda-forge
jack                      1.9.18            hfd4fe87_1001    conda-forge
jbig                      2.1               h7f98852_2003    conda-forge
jpeg                      9e                   h166bdaf_1    conda-forge
json-c                    0.15                 h98cffda_0    conda-forge
jsoncpp                   1.9.5                h4bd325d_1    conda-forge
jxrlib                    1.1                  h7f98852_2    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.2           py310hbf28c38_1    conda-forge
krb5                      1.19.3               h3790be6_0    conda-forge
lame                      3.100             h7f98852_1001    conda-forge
lcms2                     2.12                 hddcbb42_0    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
lerc                      3.0                  h9c3ff4c_0    conda-forge
libarchive                3.5.2                hccf745f_1    conda-forge
libblas                   3.9.0           14_linux64_openblas    conda-forge
libbrotlicommon           1.0.9                h166bdaf_7    conda-forge
libbrotlidec              1.0.9                h166bdaf_7    conda-forge
libbrotlienc              1.0.9                h166bdaf_7    conda-forge
libcap                    2.51                 h166bdaf_1    conda-forge
libcblas                  3.9.0           14_linux64_openblas    conda-forge
libclang                  14.0.3          default_h2e3cab8_0    conda-forge
libclang13                14.0.3          default_h3a83d3e_0    conda-forge
libcups                   2.3.3                hf5a7f15_1    conda-forge
libcurl                   7.83.1               h7bff187_0    conda-forge
libdb                     6.2.32               h9c3ff4c_0    conda-forge
libdeflate                1.10                 h7f98852_0    conda-forge
libdrm                    2.4.109              h7f98852_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libevent                  2.1.10               h9b69904_4    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libflac                   1.3.4                h27087fc_0    conda-forge
libgcc-ng                 12.1.0              h8d9b700_16    conda-forge
libgfortran-ng            12.1.0              h69a702a_16    conda-forge
libgfortran5              12.1.0              hdcd56e2_16    conda-forge
libglib                   2.70.2               h174f98d_4    conda-forge
libglu                    9.0.0             he1b5a44_1001    conda-forge
libgomp                   12.1.0              h8d9b700_16    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.9.0           14_linux64_openblas    conda-forge
libllvm14                 14.0.3               he0ac6c6_0    conda-forge
libmamba                  0.23.1               hd8a31e3_1    conda-forge
libmambapy                0.23.1          py310hab0e683_1    conda-forge
libmicrohttpd             0.9.75               h7f98852_0    conda-forge
libnetcdf                 4.8.1           nompi_h329d8a1_102    conda-forge
libnghttp2                1.47.0               h727a467_0    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libogg                    1.3.4                h7f98852_1    conda-forge
libopenblas               0.3.20          pthreads_h78a6416_0    conda-forge
libopus                   1.3.1                h7f98852_1    conda-forge
libpciaccess              0.16                 h516909a_0    conda-forge
libpng                    1.6.37               h21135ba_2    conda-forge
libpq                     14.3                 hd77ab85_0    conda-forge
libraw                    0.20.2               h10796ff_1    conda-forge
libsndfile                1.0.31               h9c3ff4c_1    conda-forge
libsolv                   0.7.22               h6239696_0    conda-forge
libssh2                   1.10.0               ha56f1ee_2    conda-forge
libstdcxx-ng              12.1.0              ha89aaad_16    conda-forge
libtheora                 1.1.1             h7f98852_1005    conda-forge
libtiff                   4.3.0                h542a066_3    conda-forge
libtool                   2.4.6             h9c3ff4c_1008    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libva                     2.14.0               h7f98852_0    conda-forge
libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
libvpx                    1.11.0               h9c3ff4c_3    conda-forge
libwebp                   1.2.2                h3452ae3_0    conda-forge
libwebp-base              1.2.2                h7f98852_1    conda-forge
libxcb                    1.13              h7f98852_1004    conda-forge
libxkbcommon              1.0.3                he3ba5ed_0    conda-forge
libxml2                   2.9.14               h22db469_0    conda-forge
libzip                    1.8.0                h4de3113_1    conda-forge
libzlib                   1.2.11            h166bdaf_1014    conda-forge
loguru                    0.6.0           py310hff52083_1    conda-forge
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
mamba                     0.23.1          py310hf87f941_1    conda-forge
matplotlib-base           3.5.2           py310h5701ce4_0    conda-forge
mayavi                    4.7.4           py310h9a68e74_1    conda-forge
mesalib                   21.2.5               h0e4506f_3    conda-forge
metis                     5.1.0             h58526e2_1006    conda-forge
mpfr                      4.1.0                h9202a9a_1    conda-forge
mpi                       1.0                       mpich    conda-forge
mpi4py                    3.1.3           py310h37cc914_1    conda-forge
mpich                     4.0.2              h846660c_100    conda-forge
mumps-include             5.2.1               ha770c72_11    conda-forge
mumps-mpi                 5.2.1               h7ee95aa_11    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mysql-common              8.0.29               haf5c9bc_0    conda-forge
mysql-libs                8.0.29               h28c427c_0    conda-forge
ncurses                   6.3                  h27087fc_1    conda-forge
nettle                    3.6                  he412f7d_0    conda-forge
nspr                      4.32                 h9c3ff4c_1    conda-forge
nss                       3.77                 h2350873_0    conda-forge
numpy                     1.22.3          py310h4ef5377_2    conda-forge
occt                      7.6.1                hd272fb3_0    conda-forge
openexr                   3.1.5                he0ac6c6_0    conda-forge
openh264                  2.1.1                h780b84a_0    conda-forge
openjpeg                  2.4.0                hb52868f_1    conda-forge
openssl                   1.1.1o               h166bdaf_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
parmetis                  4.0.3             h2a9763c_1005    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
petsc                     3.17.1          real_h6e9d0b6_100    conda-forge
petsc4py                  3.17.0          real_h5faf7bb_100    conda-forge
pillow                    9.1.0           py310he619898_2    conda-forge
pip                       22.1               pyhd8ed1ab_0    conda-forge
proj                      9.0.0                h93bde94_1    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptscotch                  6.0.9                hb499603_2    conda-forge
pugixml                   1.11.4               h9c3ff4c_0    conda-forge
pulseaudio                14.0                 hb166930_4    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.3           py310h5764c6d_1010    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyface                    7.4.1              pyhd8ed1ab_0    conda-forge
pygments                  2.12.0             pyhd8ed1ab_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pyqt                      5.15.4          py310hd8f1fbe_0    conda-forge
pyqt5-sip                 12.9.0          py310hd8f1fbe_0    conda-forge
pysocks                   1.7.1           py310hff52083_5    conda-forge
python                    3.10.4          h9a8a25e_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
qt-main                   5.15.3               hf97cb25_1    conda-forge
rapidjson                 1.1.0             he1b5a44_1002    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
reproc                    14.2.3               h7f98852_0    conda-forge
reproc-cpp                14.2.3               h9c3ff4c_0    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
ruamel_yaml               0.15.80         py310h6acc77f_1006    conda-forge
scalapack                 2.2.0                hd931219_1    conda-forge
scikit-fmm                2022.3.26                pypi_0    pypi
scipy                     1.8.0           py310hea5193d_1    conda-forge
scotch                    6.0.9                hb2e6521_2    conda-forge
setuptools                62.2.0          py310hff52083_0    conda-forge
sip                       6.5.1           py310h122e73d_2    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.38.5               h4ff8645_0    conda-forge
suitesparse               5.10.1               h9e50725_1    conda-forge
superlu                   5.2.2                h16cfea0_0    conda-forge
superlu_dist              7.2.0                h25dcc4a_0    conda-forge
svt-av1                   0.9.1                h27087fc_0    conda-forge
tbb                       2021.5.0             h924138e_1    conda-forge
tbb-devel                 2021.5.0             h924138e_1    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tqdm                      4.64.0             pyhd8ed1ab_0    conda-forge
traits                    6.3.2           py310h5764c6d_1    conda-forge
traitsui                  7.3.1              pyhd8ed1ab_0    conda-forge
tzdata                    2022a                h191b570_0    conda-forge
unicodedata2              14.0.0          py310h5764c6d_1    conda-forge
urllib3                   1.26.9             pyhd8ed1ab_0    conda-forge
utfcpp                    3.2.1                ha770c72_0    conda-forge
vtk                       9.1.0           osmesa_py310h9b2d59d_107    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
x264                      1!161.3030           h7f98852_1    conda-forge
x265                      3.5                  h924138e_3    conda-forge
xorg-damageproto          1.2.1             h7f98852_1002    conda-forge
xorg-fixesproto           5.0               h7f98852_1002    conda-forge
xorg-glproto              1.4.17            h7f98852_1002    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.0.10               h7f98852_0    conda-forge
xorg-libsm                1.2.3             hd9c2040_1000    conda-forge
xorg-libx11               1.7.2                h7f98852_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdamage           1.1.5                h7f98852_1    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h7f98852_1    conda-forge
xorg-libxfixes            5.0.3             h7f98852_1004    conda-forge
xorg-libxmu               1.1.3                h7f98852_0    conda-forge
xorg-libxrandr            1.5.2                h7f98852_1    conda-forge
xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
xorg-libxt                1.2.1                h7f98852_2    conda-forge
xorg-randrproto           1.5.0             h7f98852_1001    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-util-macros          1.19.3               h7f98852_0    conda-forge
xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
xorg-xf86vidmodeproto     2.3.1             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
yaml-cpp                  0.6.3                he1b5a44_4    conda-forge
zipp                      3.8.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h166bdaf_1014    conda-forge
zstd                      1.5.2                ha95c52a_0    conda-forge

Environment info

active environment : myEnvironment
    active env location : /usr/share/miniconda/envs/myEnvironment
            shell level : 1
       user config file : /home/vsts/.condarc
 populated config files : /home/vsts/.condarc
          conda version : 4.11.0
    conda-build version : not installed
         python version : 3.9.7.final.0
       virtual packages : __linux=5.13.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /usr/share/miniconda  (writable)
      conda av data dir : /usr/share/miniconda/etc/conda
  conda av metadata url : None
           channel URLs : 
          package cache : /usr/share/miniconda/pkgs
                          /home/vsts/.conda/pkgs
       envs directories : /usr/share/miniconda/envs
                          /home/vsts/.conda/envs
               platform : linux-64
             user-agent : conda/4.11.0 requests/2.27.1 CPython/3.9.7 Linux/5.13.0-1022-azure ubuntu/20.04.4 glibc/2.31
                UID:GID : 1001:121
             netrc file : None
           offline mode : False
ccordoba12 commented 2 years ago

Hey @guyer, thanks for reporting. I think you need to check what Linux package provides the libxcb-icccm.so.4 library and install it with apt in your CI.

guyer commented 2 years ago

Thank you, @ccordoba12. It turns out to be even easier than that (and documented in the conda-forge FAQ): I just had to set QT_QPA_PLATFORM=offscreen on the CI.