Open claudiushaag opened 1 year ago
After some more tries, the situation is now somewhat resolved. I don't know why, but find_library()
is now able to find env/bin/gmsh.dll and loads it. It wasn't able to do so when creating this issue.
One point still stands: the gmsh.dll is not put something where it is originally expected by the GMSH projekt and the gmsh.py file. It is only found because of a fallback via scanning all directories related to the PATH-variables. In light of the errors I encountered, this would be a fix to make the package possibly more stable.
Sadly, I do not know how to do that.
Solution to issue cannot be found in the documentation.
Issue
Hello!
First of all: thank you for providing gmsh for conda environments!
I'm trying to use gmsh to generate a large number of meshes from python code. It would be very handy to be able to import the python-api via a conda package, so other people of my research group can get started very fast. But by using the package, I ran into a problem, which I would like to explain here.
To make sure, the problem does not lie within the gmsh code itself: Connecting and using the gmsh python-api via downloading the sdk and making it findable in the conda-environment via 'conda develop' works flawlessly.
Reproducing the Error:
conda create -n gmsh_test -c conda-forge gmsh python-gmsh
Analysis
Going through the lines (29-51, attached below) before the error in gmsh.py, one notices that the script is trying to find the "gmsh-4.11.dll" file in various destinations, but is not able to. This leads to
libpath
beingNone
. Searching in the entire environment folder, I am only able to find "gmsh.dll" in "Library/bin". It seems to me, as "gmsh-4.11.dll" is not placed where it should be for the python api to work.Looking at
recipe/bld_gmsh.bat
, I noticed the moving of "gmsh.dll" into the mentioned "Library/bin" folder. But I'm curious, why it would be missing the version number? With missing version number, it can only be found via gmsh.py if it is put into a folder searched byfind_library()
. Did gmsh maybe change the name of the .dll file with including the version number, so it cannot be found anymore?I would really appreciate your help solving this. I tried to have a look into the problem as deep as I could, as I do not have any experience in providing conda-packages. I hope I was able to explain the problem.
Code Example:
The problematic code is basically this snippet in gmsh.py.
Installed packages
Environment info