conda-forge / pymol-open-source-feedstock

A conda-smithy repository for pymol-open-source.
BSD 3-Clause "New" or "Revised" License
14 stars 6 forks source link

Could not load the Qt platform plugin "xcb" in "" even though it was found. #29

Open UedaHH opened 6 months ago

UedaHH commented 6 months ago

Comment:

Hi, I'm trying to install pymol-open-source-3.0.0 in a virtual env of miniconda3 under Ubuntu 22.04.4 LTS. After installed, I commanded pymol, but pymol didn't start and the following message appeared.

qt.qpa.xcb: could not connect to display

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.

Aborted (core dumped)

To address the problem, I tried two commands.

  1. export DISPLAY=:0
  2. export QT_QPA_PLATFORM_PLUGIN_PATH=/home/usr_name/miniconda3/envs/env_name/plugins/platforms/

However, pymol remains to start, and the error message is

qt.qpa.xcb: could not connect to display :0
qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/usr_name/miniconda3/envs/env_name/plugins/platforms/" 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 (from /home/usr_name/miniconda3/envs/env_name/plugins/platforms/), minimal (from /home/usr_name/miniconda3/envs/env_name/plugins/platforms/), minimalegl (from /home/usr_name/miniconda3/envs/env_name/plugins/platforms/), offscreen (from /home/usr_name/miniconda3/envs/env_name/plugins/platforms/), vnc (from /home/usr_name/miniconda3/envs/env_name/plugins/platforms/), webgl (from /home/usr_name/miniconda3/envs/env_name/plugins/platforms/), xcb (from /home/usr_name/miniconda3/envs/env_name/plugins/platforms/), eglfs, minimal, minimalegl, offscreen, vnc, webgl, xcb.

I would like to thank you if you tell me any solution.

bkpoon commented 6 months ago

Can you list the packages in your environment with conda list -n env_name? And does PyMOL version 2.5 work?

UedaHH commented 6 months ago

I would appreciate your reply.

  1. conda list -n env_name
    # Name                    Version                   Build  Channel
    _libgcc_mutex             0.1                 conda_forge    conda-forge
    _openmp_mutex             4.5                       2_gnu    conda-forge
    alsa-lib                  1.2.11               hd590300_1    conda-forge
    attr                      2.5.1                h166bdaf_1    conda-forge
    blosc                     1.21.5               hc2324a3_1    conda-forge
    bzip2                     1.0.8                hd590300_5    conda-forge
    c-ares                    1.28.1               hd590300_0    conda-forge
    ca-certificates           2024.2.2             hbcca054_0    conda-forge
    cairo                     1.18.0               h3faef2a_0    conda-forge
    dbus                      1.13.6               h5008d03_3    conda-forge
    expat                     2.6.2                h59595ed_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                 h77eed37_1    conda-forge
    fontconfig                2.14.2               h14ed4e7_0    conda-forge
    fonts-conda-ecosystem     1                             0    conda-forge
    fonts-conda-forge         1                             0    conda-forge
    freetype                  2.12.1               h267a509_2    conda-forge
    gettext                   0.22.5               h59595ed_2    conda-forge
    gettext-tools             0.22.5               h59595ed_2    conda-forge
    glew                      2.1.0                h9c3ff4c_2    conda-forge
    glib                      2.80.0               hf2295e7_4    conda-forge
    glib-tools                2.80.0               hde27a5a_4    conda-forge
    glm                       0.9.9.8              h00ab1b0_0    conda-forge
    graphite2                 1.3.13            h59595ed_1003    conda-forge
    gst-plugins-base          1.24.1               hfa15dee_1    conda-forge
    gstreamer                 1.24.1               h98fc4e7_1    conda-forge
    harfbuzz                  8.3.0                h3d44ed6_0    conda-forge
    hdf4                      4.2.15               h2a13503_7    conda-forge
    hdf5                      1.14.3          nompi_h4f84152_100    conda-forge
    icu                       73.2                 h59595ed_0    conda-forge
    keyutils                  1.6.1                h166bdaf_0    conda-forge
    krb5                      1.21.2               h659d440_0    conda-forge
    lame                      3.100             h166bdaf_1003    conda-forge
    ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
    libaec                    1.1.3                h59595ed_0    conda-forge
    libasprintf               0.22.5               h661eb56_2    conda-forge
    libasprintf-devel         0.22.5               h661eb56_2    conda-forge
    libblas                   3.9.0           22_linux64_openblas    conda-forge
    libcap                    2.69                 h0f662aa_0    conda-forge
    libcblas                  3.9.0           22_linux64_openblas    conda-forge
    libclang-cpp15            15.0.7          default_h127d8a8_5    conda-forge
    libclang13                18.1.3          default_h5d6823c_0    conda-forge
    libcups                   2.3.3                h4637d8d_4    conda-forge
    libcurl                   8.7.1                hca28451_0    conda-forge
    libedit                   3.1.20191231         he28a2e2_2    conda-forge
    libev                     4.33                 hd590300_2    conda-forge
    libevent                  2.1.12               hf998b51_1    conda-forge
    libexpat                  2.6.2                h59595ed_0    conda-forge
    libffi                    3.4.2                h7f98852_5    conda-forge
    libflac                   1.4.3                h59595ed_0    conda-forge
    libgcc-ng                 13.2.0               h807b86a_5    conda-forge
    libgcrypt                 1.10.3               hd590300_0    conda-forge
    libgettextpo              0.22.5               h59595ed_2    conda-forge
    libgettextpo-devel        0.22.5               h59595ed_2    conda-forge
    libgfortran-ng            13.2.0               h69a702a_5    conda-forge
    libgfortran5              13.2.0               ha4646dd_5    conda-forge
    libglib                   2.80.0               hf2295e7_4    conda-forge
    libglu                    9.0.0             hac7e632_1003    conda-forge
    libgomp                   13.2.0               h807b86a_5    conda-forge
    libgpg-error              1.48                 h71f35ed_0    conda-forge
    libiconv                  1.17                 hd590300_2    conda-forge
    libjpeg-turbo             3.0.0                hd590300_1    conda-forge
    liblapack                 3.9.0           22_linux64_openblas    conda-forge
    libllvm15                 15.0.7               hb3ce162_4    conda-forge
    libllvm18                 18.1.3               h2448989_0    conda-forge
    libnetcdf                 4.9.2           nompi_h9612171_113    conda-forge
    libnghttp2                1.58.0               h47da74e_1    conda-forge
    libnsl                    2.0.1                hd590300_0    conda-forge
    libogg                    1.3.4                h7f98852_1    conda-forge
    libopenblas               0.3.27          pthreads_h413a1c8_0    conda-forge
    libopus                   1.3.1                h7f98852_1    conda-forge
    libpng                    1.6.43               h2797004_0    conda-forge
    libpq                     16.2                 h33b98f1_1    conda-forge
    libsndfile                1.2.2                hc60ed4a_1    conda-forge
    libsqlite                 3.45.2               h2797004_0    conda-forge
    libssh2                   1.11.0               h0841786_0    conda-forge
    libstdcxx-ng              13.2.0               h7e041cc_5    conda-forge
    libsystemd0               255                  h3516f8a_1    conda-forge
    libuuid                   2.38.1               h0b41bf4_0    conda-forge
    libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
    libxcb                    1.15                 h0b41bf4_0    conda-forge
    libxcrypt                 4.4.36               hd590300_1    conda-forge
    libxkbcommon              1.7.0                h662e7e4_0    conda-forge
    libxml2                   2.12.6               h232c23b_1    conda-forge
    libzip                    1.10.1               h2629f0a_3    conda-forge
    libzlib                   1.2.13               hd590300_5    conda-forge
    lz4-c                     1.9.4                hcb278e6_0    conda-forge
    mpg123                    1.32.6               h59595ed_0    conda-forge
    mysql-common              8.3.0                hf1915f5_4    conda-forge
    mysql-libs                8.3.0                hca2cd23_4    conda-forge
    ncurses                   6.4.20240210         h59595ed_0    conda-forge
    nspr                      4.35                 h27087fc_0    conda-forge
    nss                       3.98                 h1d7d5a4_0    conda-forge
    numpy                     1.26.4          py312heda63a1_0    conda-forge
    openssl                   3.2.1                hd590300_1    conda-forge
    packaging                 24.0               pyhd8ed1ab_0    conda-forge
    pcre2                     10.43                hcad00b1_0    conda-forge
    pip                       24.0               pyhd8ed1ab_0    conda-forge
    pixman                    0.43.2               h59595ed_0    conda-forge
    ply                       3.11               pyhd8ed1ab_2    conda-forge
    pmw                       2.0.1           py312h7900ff3_1008    conda-forge
    pthread-stubs             0.4               h36c2ea0_1001    conda-forge
    pulseaudio-client         17.0                 hb77b528_0    conda-forge
    pymol-open-source         3.0.0           py312h270e5e6_7    conda-forge
    pyqt                      5.15.9          py312h949fe66_5    conda-forge
    pyqt5-sip                 12.12.2         py312h30efb56_5    conda-forge
    python                    3.12.2          hab00c5b_0_cpython    conda-forge
    python_abi                3.12                    4_cp312    conda-forge
    qt-main                   5.15.8              hc9dc06e_21    conda-forge
    readline                  8.2                  h8228510_1    conda-forge
    setuptools                69.5.1             pyhd8ed1ab_0    conda-forge
    sip                       6.7.12          py312h30efb56_0    conda-forge
    snappy                    1.2.0                hdb0a2a9_1    conda-forge
    tk                        8.6.13          noxft_h4845f30_101    conda-forge
    toml                      0.10.2             pyhd8ed1ab_0    conda-forge
    tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
    tzdata                    2024a                h0c530f3_0    conda-forge
    wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
    xcb-util                  0.4.0                hd590300_1    conda-forge
    xcb-util-image            0.4.0                h8ee46fc_1    conda-forge
    xcb-util-keysyms          0.4.0                h8ee46fc_1    conda-forge
    xcb-util-renderutil       0.3.9                hd590300_1    conda-forge
    xcb-util-wm               0.4.1                h8ee46fc_1    conda-forge
    xkeyboard-config          2.41                 hd590300_0    conda-forge
    xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
    xorg-libice               1.1.1                hd590300_0    conda-forge
    xorg-libsm                1.2.4                h7391055_0    conda-forge
    xorg-libx11               1.8.9                h8ee46fc_0    conda-forge
    xorg-libxau               1.0.11               hd590300_0    conda-forge
    xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
    xorg-libxext              1.3.4                h0b41bf4_2    conda-forge
    xorg-libxrender           0.9.11               hd590300_0    conda-forge
    xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
    xorg-xextproto            7.3.0             h0b41bf4_1003    conda-forge
    xorg-xf86vidmodeproto     2.3.1             h7f98852_1002    conda-forge
    xorg-xproto               7.0.31            h7f98852_1007    conda-forge
    xz                        5.2.6                h166bdaf_0    conda-forge
    zlib                      1.2.13               hd590300_5    conda-forge
    zstd                      1.5.5                hfc55251_0    conda-forge
  2. I tried pymol version 2.5 , but it failed to start. The error message is
ImportError: libvtkm_cont-1.5.so.1: cannot open shared object file: No such file or directory
bkpoon commented 6 months ago

I was able to start PyMOL 3.0.0 with Python 3.12 on Ubuntu 22.04, but I was using WSL on Windows to run it. Are you running Linux natively? And are you trying to run PyMOL locally or over X or a remote desktop? The error about not being able to connect to a display is concerning. Can you start another graphical application? Something like xeyes?

UedaHH commented 6 months ago

Thank you very much. I tried to run pymol locally using WSL1 on Windows. And in this condition, xeyes also failed to work. Then, I modified the following topic.

  1. To update WSL1 to WSL2, I commanded wsl --set-version Ubuntu 2 on Windows Command Prompt. After this update, xeyes successfully worked, and the browser of pymol 3.0.0 opened, but the following error messages appeared.

    QStandardPaths: wrong permissions on runtime directory /run/user/1000/, 0755 instead of 0700
    PyMOL(TM) Molecular Graphics System, Version 3.0.0.
    Copyright (c) Schrodinger, LLC.
    All Rights Reserved.
    
    Created by Warren L. DeLano, Ph.D.
    
    PyMOL is user-supported open-source software.  Although some versions
    are freely available, PyMOL is not in the public domain.
    
    If PyMOL is helpful in your work or study, then please volunteer
    support for our ongoing efforts to create open and affordable scientific
    software by purchasing a PyMOL Maintenance and/or Support subscription.
    
    More information can be found at "http://www.pymol.org".
    
    Enter "help" for a list of commands.
    Enter "help <command-name>" for information on a specific command.
    
    Hit ESC anytime to toggle between text and graphics.
    
    Detected OpenGL version 4.1. Shaders available.
    ShaderPrg-Error: vertex shader compilation failed.; name='bezier'
    ShaderPrg-Error-InfoLog:
    0:1(10): error: GLSL 4.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 1.00 ES, and 3.00 ES
    
    Detected GLSL version 4.10.
    OpenGL graphics engine:
    GL_VENDOR:   Microsoft Corporation
    GL_RENDERER: D3D12 (Intel(R) UHD Graphics 630)
    GL_VERSION:  4.1 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
    ShaderPrg-Error: vertex shader compilation failed.; name='bezier'
    ShaderPrg-Error-InfoLog:
    0:1(10): error: GLSL 4.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 1.00 ES, and 3.00 ES
    
    Detected 6 CPU cores.  Enabled multithreaded rendering.
  2. To address the first error message (i.e., QStandardPaths: wrong permissions on runtime directory /run/user/1000/, 0755 instead of 0700), I commanded chmod 0700 /run/user/1000/, resulting the message disappeared.

  3. However, the other messages (i.e., ShaderPrg-Error: vertex shader compilation failed.; name='bezier' and ShaderPrg-Error-InfoLog: 0:1(10): error: GLSL 4.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 1.00 ES, and 3.00 ES) remain.

  4. pymol 2.5 still didn't start, and the error message was the same. ImportError: libvtkm_cont-1.5.so.1: cannot open shared object file: No such file or directory

I want to solve topic 3 especially. I'd be pleased if there is any idea.

bkpoon commented 6 months ago

Can you try the solution described here? (https://github.com/microsoft/WSL/issues/9753#issuecomment-1459626307)

Basically,

  1. Try updating your mesa Ubuntu package with sudo apt-get upgrade. This updates everything on your Ubuntu installation. You can also try upgrading specific packages.
  2. Run glxinfo -B. If you see Device: D3D12 in the output, then run export LIBGL_ALWAYS_SOFTWARE=true to force software rendering before running glxinfo -B again. You should see Device: llvmpipe in the output.
  3. Try running PyMOL again (with LIBGL_ALWAYS_SOFTWARE=true if you needed it in step 2)

If you still get an error, please paste the output from glxinfo -B.

UedaHH commented 6 months ago

Thank you very much. In conclusion, thanks to your advice, pymol 3.0.0 successfully started without any error message. The process is described below.

  1. I updated Ubuntu packages with sudo apt-get upgrade and ran glxinfo -B, resulting

    Command 'glxinfo' not found, but can be installed with:
    sudo apt install mesa-utils

    Then I executed sudo apt install mesa-utils and updated again.

  2. I ran glxinfo -B, and the output was

    
    name of display: :0
    display: :0  screen: 0
    direct rendering: Yes
    Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (Intel(R) UHD Graphics 630) (0xffffffff)
    Version: 23.2.1
    Accelerated: yes
    Video memory: 4157MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.1
    Max compat profile version: 4.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
    OpenGL vendor string: Microsoft Corporation
    OpenGL renderer string: D3D12 (Intel(R) UHD Graphics 630)
    OpenGL core profile version string: 4.1 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
    OpenGL core profile shading language version string: 4.10
    OpenGL core profile context flags: (none)
    OpenGL core profile profile mask: core profile

OpenGL version string: 4.1 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2 OpenGL shading language version string: 4.10 OpenGL context flags: (none) OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 23.2.1-1ubuntu3.1~22.04.2 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Since `Device: D3D12` was shown, I ran `export LIBGL_ALWAYS_SOFTWARE=true`. Then the output of `glxinfo -B` was

name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Mesa (0xffffffff) Device: llvmpipe (LLVM 15.0.7, 256 bits) (0xffffffff) Version: 23.2.1 Accelerated: no Video memory: 3852MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 4.5 Max compat profile version: 4.5 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 Memory info (GL_ATI_meminfo): VBO free memory - total: 31 MB, largest block: 31 MB VBO free aux. memory - total: 3074 MB, largest block: 3074 MB Texture free memory - total: 31 MB, largest block: 31 MB Texture free aux. memory - total: 3074 MB, largest block: 3074 MB Renderbuffer free memory - total: 31 MB, largest block: 31 MB Renderbuffer free aux. memory - total: 3074 MB, largest block: 3074 MB Memory info (GL_NVX_gpu_memory_info): Dedicated video memory: 4294837284 MB Total available memory: 4294841136 MB Currently available dedicated video memory: 31 MB OpenGL vendor string: Mesa OpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits) OpenGL core profile version string: 4.5 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2 OpenGL core profile shading language version string: 4.50 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile

OpenGL version string: 4.5 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2 OpenGL shading language version string: 4.50 OpenGL context flags: (none) OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.2.1-1ubuntu3.1~22.04.2 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

I saw `Device: llvmpipe`, according to you.

3. Finally, I ran `pymol` and opened the browser without error. The output is

PyMOL(TM) Molecular Graphics System, Version 3.0.0. Copyright (c) Schrodinger, LLC. All Rights Reserved.

Created by Warren L. DeLano, Ph.D.

PyMOL is user-supported open-source software.  Although some versions
are freely available, PyMOL is not in the public domain.

If PyMOL is helpful in your work or study, then please volunteer
support for our ongoing efforts to create open and affordable scientific
software by purchasing a PyMOL Maintenance and/or Support subscription.

More information can be found at "http://www.pymol.org".

Enter "help" for a list of commands.
Enter "help <command-name>" for information on a specific command.

Hit ESC anytime to toggle between text and graphics.

Detected OpenGL version 4.5. Shaders available. Detected GLSL version 4.50. OpenGL graphics engine: GL_VENDOR: Mesa GL_RENDERER: llvmpipe (LLVM 15.0.7, 256 bits) GL_VERSION: 4.5 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2 Detected 6 CPU cores. Enabled multithreaded rendering.


I would appreciate sincerely your responses to a beginner like me. And I hope that this chat will be helpful for people having the same problem.