3dem / relion

Image-processing software for cryo-electron microscopy
https://relion.readthedocs.io/en/latest/
GNU General Public License v2.0
451 stars 201 forks source link

Qt5 issues relion5 when running DynaMight #1019

Closed xeniorn closed 12 months ago

xeniorn commented 12 months ago

When running Dynamight, program crashes with a Qt5-related error. This seems a conda env issue independent of relion itself. Please advise. Many thanks!

Environment:

Dataset:

Job options:

Error message:

Please cite the full error message as the example below.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/appdata/vbc-tools/clausen/cbe/programs/conda/relion/relion5-v231101/relion-5.0/lib/python3.10/site-packages/dynamight/__init__.py", line 5, in <module>
    from .evaluation import explore_latent_space
  File "/appdata/vbc-tools/clausen/cbe/programs/conda/relion/relion5-v231101/relion-5.0/lib/python3.10/site-packages/dynamight/evaluation/explore_latent_space.py", line 11, in <module>
    from .visualizer import Visualizer_val, Visualizer
  File "/appdata/vbc-tools/clausen/cbe/programs/conda/relion/relion5-v231101/relion-5.0/lib/python3.10/site-packages/dynamight/evaluation/visualizer.py", line 9, in <module>
    from PyQt5.QtCore import Qt
ImportError: /appdata/vbc-tools/clausen/cbe/programs/conda/relion/relion5-v231101/relion-5.0/lib/python3.10/site-packages/PyQt5/QtCore.abi3.so: symbol _ZdaPvm, version Qt_5 not defined in file libQt5Core.so.5 with link time reference

Same happens if I load the conda environment outside of relion, open python, and run "from dynamight import cli", like relion_python_dynamight does.

Relion build command (cmake 3.24.3 via easybuild):

cmake  -DCMAKE_INSTALL_PREFIX=/appdata/vbc-tools/clausen/cbe/lmod_modules/software/relion/ja231102_5.0-beta-635b591-foss-2022b -DCMAKE_FIND_USE_PACKA
GE_REGISTRY=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON  -DCMAKE_CXX_FLAGS="-pthread"  -DDoublePrec_GPU=OFF -DDoublePrec_CPU=ON  -DCUDA=ON -DCudaTexture=ON -DCUDA_ARCH=12.0.0  -DPYTHON_EXE_PA
TH=/appdata/vbc-tools/clausen/cbe/programs/conda/relion/relion5-v231101/relion-5.0/bin/python  -DTORCH_HOME_PATH=/appdata/vbc-tools/clausen/cbe/resources/relion-5.0/torch_home_231101  /tmp/relion/ja231102_5
.0-beta-635b591/foss-2022b/relion-635b59196f7b7cd37d7a9f95b65a880663a51bb5/

Conda env build command (using newest miniconda 23.9.0) :

/appdata/vbc-tools/clausen/cbe/programs/m/miniconda/23.9.0/bin/conda env create -p /appdata/vbc-tools/clausen/cbe/programs/conda/relion/relion5-v231101/relion-5.0 -f environment.yml
xeniorn commented 12 months ago

Correction, the error only happens when the relion dependencies are loaded (we use lmod modules to load the dependencies). If I build the python env in a clean environment, it works normally. But that doesn't allow me to run DynaMight from the relion GUI.

biochem-fan commented 12 months ago

Perhaps your LD_LIBRARY_PATH is problematic?

This seems a conda env issue independent of relion itself.

In this case, you should ask in CCPEM, because more people is watching and you have a higher chance of getting a response. In general, I cannot advise on RELION integration with modules, containers etc.

xeniorn commented 12 months ago

You're right, I only later noticed it is likely a module interference issue, I thought the conda env build step was unstable. I'll close this for now.

xeniorn commented 12 months ago

Just for reference, the issue is based on the conflict with the qt5 module installed as dependence of gnuplot. Not sure why the gnuplot one is interfering with the one in the conda env, but we worked around it by simply removing gnuplot from the installation.