I’ve just run a fresh Windows 11 VM, installed python 3.12.4 from Microsoft Store,
installed netgen with pip install --upgrade ngsolve and added C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts
to the PATH environment variable, but netgen cannot start because of the following error:
C:\Users\User>netgen
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts\netgen.exe\__main__.py", line 4, in <module>
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\netgen\__init__.py", line 98, in <module>
from pyngcore import Timer
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pyngcore\__init__.py", line 1, in <module>
from .pyngcore import *
ImportError: DLL load failed while importing pyngcore: A dynamic link library (DLL) initialization routine failed.
Do you have any news about this issue? Something is definitively not working as expected if the software cannot work on a fresh virtual machine, don’t you agree?
This is not a real fix but as far as I know the python from the microsoft store has some weird installation behaviour… Does it work if python is installed from the python website?
I tried also with python 3.13 and 3.11, but I got the same error.
Seems to me that there is a problem on the package pyngcore.
This is the free VM that I used: Oracle Virtual Box.
I can’t find pyngcore.dll. I have pyngcore.cp312-win_amd64.pyd in C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pyngcore instead.
C:\Users\User>netgen Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\User\AppData\Local\Programs\Python\Python312\Scripts\netgen.exe\__main__.py", line 4, in <module> File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\netgen\__init__.py", line 98, in <module> from pyngcore import Timer File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyngcore\__init__.py", line 1, in <module> from .pyngcore import * ImportError: DLL load failed while importing pyngcore: A dynamic link library (DLL) initialization routine failed.
C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyngcore and
C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\netgen
Thank you for the info, I had the same issue, with version 6.2.2402, I can at least import ngsolve.
However, I still have issues with using some commands.
I tried some basic code for meshing, as described in (4.3 Working with meshes — NGS-Py 6.2.2405 documentation), but I couldn’t use the draw command.
from ngsolve.webgui import Draw
Draw(mesh)
resulted in the Kernel crashing
import ngsolve
ngsolve.webgui.Draw(mesh)
results in AttributeError: module ‘ngsolve’ has no attribute ‘webgui’
Did you ever encounter any similar issues?
Could it be a compatibility issue because I am using a different Version of Python or other packages?