undefined symbol: _ZdlPvm, version Qt_5
BrandonMan123 opened this issue · comments
System information: Ubuntu 22.04
Recreation steps:
pip3 install pymeshlab
python
import pymeshlab
I then receive the following error:
/sketch2prototype/stable-dreamfusion/venv_stable-dreamfusion/lib/python3.11/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5
Not sure why this is happening. I tried installing pymesh lab on my Mac (M1 Ventura 13.4.1) and it worked. My guess is that it is a system issue but not sure where the issue lies. Would appreciate any first steps to debug. Thanks
I meet the same issue on Ubuntu 18.04.6 LTS...
It is probably conflicting with a qt system installation. It shouldn't happen because it should first look for the bundled qt libraries.
This issue was already reported, by I've never been able to reproduce it and therefore I'm also unable to solve it...
If someone has suggestions on what could cause this issue, they are welcome!
i met the same issue on ubuntu 22.04.3 LTS,
my steps:
1.pip3 install pymeshlab
2.python
3.import pymeshlab
then meet :
Traceback (most recent call last):
File "", line 1, in
File "/home/wty/.local/lib/python3.10/site-packages/pymeshlab/init.py", line 11, in
from .pmeshlab import *
ImportError: /home/wty/.local/lib/python3.10/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5
The issue can be caused by the interaction of the user system, the specific version of Qt against which libmeshlab-common.so was compiled, and what specific version of Qt is referenced at runtime. This is likely complicated by path issues, despite pymeshlab
having deploy scripts. ldd
and tools like it can help track this down. But @alemuntoni doesn't have access to our Qt versions or paths, so this issue would be virtually impossible to reproduce.
My solution was to stand up a container with the requirements, and just build PyMeshLab myself and install it, e.g.
git clone --recursive https://github.com/cnr-isti-vclab/PyMeshLab.git
DEBIAN_FRONTEND=noninteractive apt-get -y update
cd PyMeshLab/ && cd scripts/Linux && chmod +x 0_setup_env.sh && yes | ./0_setup_env.sh
cd PyMeshLab/ && cd scripts/Linux && chmod +x 1_build.sh && ./1_build.sh
cd PyMeshLab/ && pip install . # installs PyMeshLab, avoids missing Qt5 symbol
echo 'export LD_LIBRARY_PATH="<path to ... /site-packages/pymeshlab/lib/:<path to ... /site-packages/pymeshlab/lib/config:$LD_LIBRARY_PATH"' >> /root/.bashrc # pymeshlab knows where to find .so s
and I can import pymeshlab
without issue despite having undefined symbols when doing a pip install.
hi I ran into the same issue on Ubuntu 20.04.6 LTS
after install the pymeshlab I
Successfully installed numpy-1.26.4 pymeshlab-2023.12.post1
I got
In [1]: import pymeshlab
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import pymeshlab
File /opt/conda/lib/python3.10/site-packages/pymeshlab/__init__.py:11
8 os.environ['QT_PLUGIN_PATH'] = this_path
9 os.environ['PATH'] = this_path + os.pathsep + os.environ['PATH']
---> 11 from .pmeshlab import *
12 from .replacer import replace_pymeshlab_filter_names
13 from .polyscope_functions import show_polyscope
ImportError: /opt/conda/lib/python3.10/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5
qt5 installed is PyQt5-Qt5-5.15.2
I ran into the same error libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5
Running the following before my python script fixed it:
export LD_LIBRARY_PATH=~/.conda/envs/<ENV_NAME>/lib/python3.9/site-packages/pymeshlab/lib/:$LD_LIBRARY_PATH
A critical detail: :$LD_LIBRARY_PATH
needs to come after the .../pymeshlab/lib/
path. If you do it the other way around, i.e. $LD_LIBRARY_PATH:~/.conda/envs/...
then it will cause the same error (presumably because the pymeshlab lib needs to be searched first).
@ArmanMaesumi that fix does help, however I get different behavior depending on whether I'm trying to import pymeshlab from a Jupyter notebook or from a python script
In the python script everything goes through fine
In the jupyter notebook I get the same error:
ImportError: /media/xallt/HardDrive/.virtualenv/python38/lib/python3.8/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5
i.e. I still cant import it in the notebook
@ArmanMaesumi that fix does help, however I get different behavior depending on whether I'm trying to import pymeshlab from a Jupyter notebook or from a python script In the python script everything goes through fine In the jupyter notebook I get the same error:
ImportError: /media/xallt/HardDrive/.virtualenv/python38/lib/python3.8/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5
i.e. I still cant import it in the notebook
@Xallt
I would suggest googling around for "LD_LIBRARY_PATH not working in jupyter notebook"
It seems like there are some relevant threads: jupyter/notebook#1290 (comment)
Note that, the solution in that thread suggests overriding the environment variable, whereas my suggestion concatenates to it. You can try both and see if it works