Dear ngsolve developer
Thank you for this versatility library. I have some issue on installing the ngsxfem, here is my procedure of the installation:
OS: ubuntu 20
I first use conda to install the ngsolve in the anaconda site package, all works well and I used it to do some calculation without any problem.
Then, I would like to install the ngsxfem to use some XFEM utils, now I have some problem:
I first tried to install it by pip3, installation had no problem. But when I import xfem in a python script, it poses an error like: from xfem.ngsxfem_py import *
ImportError: arg(): could not convert default argument into a Python object (type not registered yet?). Compile in debug mode for more information.
I was not sure what was going on, so I tried to install it from source, I followed the instruction on the site: clone the source (the most recent version 2.0) and build it. However, when I sudo make install, error occured:
[100%] Built target ngsxfem_py
Install the project…
– Install configuration: “”
– Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/ngsxfem_py.so
– Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/init.py
– Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/cutmg.py
– Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/mlset.py
– Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/lset_spacetime.py
– Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/lsetcurv.py
– Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/utils.py
– Up-to-date: /home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/ngs_check.py
importing ngsxfem-2.0
Traceback (most recent call last):
File “/home/swu2019/anaconda3/lib/python3.8/runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/home/swu2019/anaconda3/lib/python3.8/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/home/swu2019/anaconda3/lib/python3.8/site-packages/pybind11_stubgen/main.py”, line 4, in
main()
File “/home/swu2019/anaconda3/lib/python3.8/site-packages/pybind11_stubgen/init.py”, line 915, in main
_module = ModuleStubsGenerator(_module_name)
File “/home/swu2019/anaconda3/lib/python3.8/site-packages/pybind11_stubgen/init.py”, line 666, in init
self.module = importlib.import_module(module_or_module_name)
File “/home/swu2019/anaconda3/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 783, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/swu2019/anaconda3/lib/python3.8/site-packages/xfem/init.py”, line 23, in
from xfem.ngsxfem_py import *
ImportError: arg(): could not convert default argument into a Python object (type not registered yet?). Compile in debug mode for more information.
CMake Error at python/cmake_install.cmake:104 (file):
file INSTALL cannot find
“/home/swu2019/programming/PyPoroX/build-xfem/python/…/stubs/xfem-stubs”:
No such file or directory.
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
Cause the /home/swu2019/anaconda3/lib/python3.8/site-packages/ is the directory of the ngsolve, I set the location for the ngsxfem here.
I am very appreciate if you could help to finish the installation or give me some hint !!!
Best regards,
Shaoqi