Comments (34)
I've had the same problem. After several attempts I realized that the error was due to the PyQt5 version <5.15. I advise you to check the version of PyQt5. Hope to be helpful.
from pymeshlab.
Here it is:
from PyQt5.QtCore import QPoint, QSize, Qt, QTimer, QRect, pyqtSignal
from PyQt5.QtGui import (QColor, QFontMetrics, QImage, QPainter, QIcon,
QOpenGLVersionProfile)
from PyQt5.QtWidgets import (QAction, QApplication, QGridLayout, QHBoxLayout,
QMainWindow, QMessageBox, QComboBox, QButtonGroup,
QOpenGLWidget, QFileDialog, QLabel, QPushButton,
QSlider, QWidget, QTableWidget, QTableWidgetItem,
QAbstractButton, QCheckBox, QErrorMessage, QTextEdit, QVBoxLayout)`
If I run the above first, I have a DLL error in importing pymeshlab
. if I run pymeshlab
first I have this error:
from PyQt5.QtWidgets import QWidget
ImportError: DLL load failed: The specified procedure could not be found.
from pymeshlab.
Could you please uninstall it and install it again with:
pip3 install pymeshlab
from pymeshlab.
Same error here,
I have uninstalled and installed several times already with the command pip3 install pymeshlab, but same error appears.
Version is now 0.1.8 despite yesterday I installed 0.1.7, which worked at some point.
Any possibile solution?
from pymeshlab.
I don't know where to start to investigate on this issue. We have tests running as expected on Windows.
I see something strange about the fact that pymeshlab is installed in an Anaconda
environment:
File "C:\Users\mutiargob\Anaconda3\lib\site-packages\pymeshlab_init_.py", line 1, in
from .pmeshlab import *
This could happen if pip has been installed through anaconda, I guess..
@SilviaCaggiari do you see something similar in your prompt?
from pymeshlab.
Yes, I reckon all and I'm running Anaconda as well.
I think there is a conflict somewhere, presumably with pyqt5 also .
I just discovered If I run "import pymeshlab" in a new file, this perfectly works, but if I start importing other libraries, depending on what I run first, I have a corresponding DLL error.
Hope this helps you in investigating
from pymeshlab.
It points in the right direction!
Could you please share a portion of script that causes the issue?
from pymeshlab.
i realise that this may be spyder's issue.
when i use anaconda prompt and type
activate [myEnv]
python
and i input:
import pymeshlab
it is successfully doing the import and the following output is shown:
PyMeshLab 0.1.7 based on MeshLab 2020.12d
so I thought that maybe this is just the wrong python path. and so I typed
python -c "import sys; print(sys.executable)"
and then, I tried to change the interpreter by going to spyder tools, and keying in the path
Tools>Preferences>Python interpreter
still doesnt work.
so I gave up and installed jupyter notebook instead of spyder.
and it worked. I'm not sure why though.
from pymeshlab.
Ok, I also verified on Windows and it seems related to conda..
I tried running on a clean windows environment this:
from PyQt5.QtCore import QPoint, QSize, Qt, QTimer, QRect, pyqtSignal
from PyQt5.QtGui import (QColor, QFontMetrics, QImage, QPainter, QIcon,
QOpenGLVersionProfile)
from PyQt5.QtWidgets import (QAction, QApplication, QGridLayout, QHBoxLayout,
QMainWindow, QMessageBox, QComboBox, QButtonGroup,
QOpenGLWidget, QFileDialog, QLabel, QPushButton,
QSlider, QWidget, QTableWidget, QTableWidgetItem,
QAbstractButton, QCheckBox, QErrorMessage, QTextEdit, QVBoxLayout)
import pymeshlab
and it works as expected.
I really don't know what conda does with paths, libraries and so on...
from pymeshlab.
Little update: with #61, I added these lines in __init__.py
:
PyMeshLab/pymeshlab/__init__.py
Lines 6 to 8 in 21ea4c9
which forces python to look for pymeshlab's Qt deployed libraries when importing pymeshlab. It was necessary to make the Qt OpenGL infrastructure work on windows. I don't know if this fix could be related with this issue and if it solves it.
If you can test this in the next pymeshlab version, when it will be released, it would be appreciated :)
from pymeshlab.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from pymeshlab.
I had a similar issue.
In a conda environment I am not able to run pymeshlab, whereas in a virtualenv pymeshlab works fine.
from pymeshlab.
Still I don't know what conda does with PATH in windows, I think that there are conflicts when linking with qt libraries.
pymeshlab contains Qt 5.15 libraries inside its package, and due to linking rules on windows, they should be linked (with all the other libraries contained in the package) when importing pymeshlab. I just don't know how to replicate and how to solve it, sorry.
If someone has some clues, help is really appreciated...
from pymeshlab.
Not using conda in Windows 10 but
>pip3 install pymeshlab Collecting pymeshlab Downloading pymeshlab-2021.7-cp38-cp38-win_amd64.whl (34.2 MB) |████████████████████████████████| 34.2 MB 49 kB/s Requirement already satisfied: numpy in c:\users\misan\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pymeshlab) (1.19.4) Installing collected packages: pymeshlab Successfully installed pymeshlab-2021.7
would lead to
`>python
Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import pymeshlab
Warning:
Unable to load the following plugins:
filter_mesh_booleans.dll: filter_mesh_booleans.dll does not seem to be a Qt Plugin.
Cannot load library C:\Users\misan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pymeshlab\lib\plugins\filter_mesh_booleans.dll: No se puede encontrar el m?dulo especificado.
filter_sketchfab.dll: filter_sketchfab.dll does not seem to be a Qt Plugin.
Cannot load library C:\Users\misan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pymeshlab\lib\plugins\filter_sketchfab.dll: No se puede encontrar el m?dulo especificado.
`
from pymeshlab.
filter_mesh_booleans.dll
That's not an error, but a warning. You are able to run pymeshlab, but without two plugins (mesh_booleans and sketchfab).
TBH, I don't know why. Having a 'standard' PATH env variable, pymeshlab will load the plugins using the bundled libraries inside the package.
The two plugins that are failing to load depend on gmp/mpfr and Qt5Network dlls.
Apparently, for some reasons, the dll loader does not find these libraries, or it is loading different versions from some other directories.
from pymeshlab.
Thanks a lot for the clarification Alessandro.
Please let me know if I can help you guys sorting out why these messages pop in Windows (I had not trouble with either Linux or OSX).
I guess I have installed other programs, like MeshLab that for sure use Qt5 so some DLLs could be floating on my system and pop up when another version was expected.
from pymeshlab.
More info. I can see Qt5Network.dll is loaded by two other programs running in my system:
And when I see what python.exe loads after doing the import pymeshlab I can see no additional instance of the process loading Qt5Network.dll but I see a few of other Qt5 dlls loaded from the right source:
from pymeshlab.
I stop the programs that were using Qt5Network.dll and I double-check now ListDlls.exe tool is no longer finding anyone using that DLL.
Now I open python and import pymeshlab, same result and message. and Qt5Network.dll is not loaded for python process (as it was not loaded before).
Could it be the hook for that dll is missing? All the other pymeshlib Qt-related libs are loaded from the right folder...
from pymeshlab.
The two plugins that are failing to load depend on gmp/mpfr and Qt5Network dlls.
Apparently, for some reasons, the dll loader does not find these libraries, or it is loading different versions from some other directories.
I reckon filter_mesh_booleans.dll does not use Qt5Network.dll
from pymeshlab.
Yes, Qt5Network dll
is only required by filter_sketchfab, and gmp/mpfr are required by filter_mesh_booleans.
These libraries are needed just by plugins, and not by the main pymeshlab framework.
To make these libraries "loadable" from the plugins in windows, there are these lines in the __init__.py
:
PyMeshLab/pymeshlab/__init__.py
Lines 6 to 10 in 7ae4fd7
We need to do this because:
- dlls need to be in a different directory wrt plugins dir;
- windows is able to load only dlls found in the same dir or in the PATH (no rpath or other mechanisms are allowed)
Therefore, before running pymeshlab, we need to add the pymeshlab directory which contains additional libraries (Qt5Network and gmp/mpfr) required by the plugins in the PATH.
It seems that modifying the PATH as done in __init__.py
does not work on some systems, I don't know why...
from pymeshlab.
it seems similar to this report: cnr-isti-vclab/meshlab#1060
from pymeshlab.
@misan I don't think it's similar. cnr-isti-vclab/meshlab#1060 seems to be an error related with locale and windows, or vc_redist... Here the issue seems to be more related to not finding some libraries bundled into the pymeshlab package...
from pymeshlab.
@alemuntoni while the dlls Meshlab was unable to load were different in Meshlab#1060, the error message looked the same.
Anyway, I have tested another system with Win10 with no issue whatsoever. The difference between the one I had trouble with and the one that worked flawlessly is the latter uses Python 3.9.4 downloaded from Python.org while the former uses Python 3.8.6 downloaded from the Microsoft store.
from pymeshlab.
The message actually does not tell nothing.. It prints "does not seem to be a Qt Plugin" everytime that fails to load a plugin, but causes could be different each time.. It's windows that does not tell anything when something goes wrong in these cases..
About your test, thanks for sharing this info! I don't think it is related with the python version, but the fact that one version was downloaded from the microsoft store could be relevant! I'll try to make some tests!
from pymeshlab.
@alemuntoni I can confirm the issue goes away when I removed the Python downloaded from the Microsoft store and installed the one downloaded from Python.org (on the system I had the issue of not loading certain DLLs).
from pymeshlab.
Now it all loads as it should:
I could see only three plugins loaded other DLLs, the two that loaded DLLs from ./lib/plugins were the ones that failed before. The one loading from WINDOWS/SYSTEM did not fail (filter_isoparametrization).
from pymeshlab.
Thanks @misan!
Therefore it seems that the python installation from the microsoft store is problematic for some reason...
After googling it, it seems that would be better to use the .exe downloaded from the python website (e.g. when installing python from the store, it is not added to PATH...). I don't think that it's worth to be fixed at all, given all these problems..
In any case, the conda issue still persists, and I still don't know how to fix it. I'm actually not sure if it could be fixed.
from pymeshlab.
I think I am having the analogous problem under linux. I found this https://stackoverflow.com/questions/61384686/why-symbol-lookup-error-undefined-symbol-when-the-symbol-exists a bit informative.
% ipython
Python 3.9.7 (default, Aug 31 2021, 13:28:12)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.27.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import pymeshlab
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-c54b031f5c64> in <module>
----> 1 import pymeshlab
~/.local/lib/python3.9/site-packages/pymeshlab/__init__.py in <module>
10 os.environ['PATH'] = this_path + os.pathsep + os.environ['PATH']
11
---> 12 from .pmeshlab import *
13
14 # load all the default plugins in the current PyMeshLab session
ImportError: /home/joel/.local/lib/python3.9/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5
Note that /home/joel/.local/lib/python3.9/site-packages/pymeshlab/lib
contains its own libQt5Core.so.5
and for this file it holds that
% nm -D /home/joel/.local/lib/python3.9/site-packages/pymeshlab/lib/libQt5Core.so.5 |grep _ZdlPvm
00000000003cbae0 T _ZdlPvm@@Qt_5
So it seems like pymeshlab
is just having troubles finding this file, one of its own files...
I tried adding the folder to the LD_LIBRARY_PATH
variable but without any luck.
I also tried from PyQt5.QtCore import ...
and that works iff I have PyQt5
installed separately. In either case, pymeshlab
gives the same error.
I am using arch linux by the way.
from pymeshlab.
Update: A clean install of pymeshlab via pip3 in ubuntu 21.04 in virtualbox does not reproduce my issue.
from pymeshlab.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the VCLab team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the last release of PyMeshLab, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
from pymeshlab.
I solved this issue by putting the pymeshlab related modul on top of the imports, maybe it has some conflicts with other imports.
from pymeshlab.
the same problem in python3.9 spyder
from pymeshlab.
Hi, I had this problem on a fresh windows vm with python (not conda or windows store version) but I was able to fix it with:
pip install msvc-runtime
from pymeshlab.
Hi, I try "python .py" on Command-Line Interface on windows and it works.
from pymeshlab.
Related Issues (20)
- How to use the meshing_remove_selected_vertices function to delete vertices? HOT 2
- BUG in ms.current_mesh().selected_face_number() ??? HOT 1
- MemoryError: std::bad_alloc HOT 5
- Problem with compute_scalar_ambient_occlusion_gpu() HOT 2
- suggestion: change error to a warning in boolean operations
- ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ~/miniconda3x86/lib/python3.11/site-packages/pymeshlab/pmeshlab.cpython-311-x86_64-linux-gnu.so) HOT 1
- Texture Map Defragmentation brings to a core dump HOT 5
- OBJ files don't load textures in pymeshlab >2022.2 HOT 2
- Is there a good way to fill the hole while maintaining the shape of the other parts? ?
- Unable to install latest version with pip HOT 6
- pymeshlab got different result with meshlab HOT 2
- saving got stuck after delete duplicate vertices
- PLY importer can't load some custom float properties HOT 2
- apply filter returns empty HOT 1
- Feature request: 3D Skin Surface Meshing
- Can't build on windows HOT 1
- ms.compute_normal_per_vertex IGNORED
- No module named 'pymeshlab.pmeshlab' HOT 1
- import Error RichFileSave HOT 3
- Method face_face_adjacency_matrix() returns odd values HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymeshlab.