Hello ngsolve / netgen developers, I’m using ngsolve and seeing the following error:
File “/home/rong1tang/FSI/FSI_h.py”, line 78, in
from ngsolve import *
File “/home/rong1tang/anaconda3/envs/Test/lib/python3.12/site-packages/ngsolve/init.py”, line 36, in
from netgen import Redraw, TimeFunction
ImportError: cannot import name ‘Redraw’ from ‘netgen’ (/home/rong1tang/anaconda3/envs/Test/lib/python3.12/site-packages/netgen/init.py)
The error occurs at the following line:
from ngsolve import *;
Not sure if it’s relevant but I only see this when running it on a Linux server without GUI. On mac os x I’m able to run it without issue.
Could you help me address this issue? Thanks a lot!
and it should be smth like some_path/netgen/__init__.py and some_path/ngsolve/__init__.py
if the paths are different something else might have installed netgen into your python environment with a different version.
Thanks for the advice. I have tried it but the same issue exists:
Traceback (most recent call last):
File “/home/rong1tang/FSI/server.py”, line 2, in
import ngsolve
File “/home/rong1tang/anaconda3/envs/Test/lib/python3.12/site-packages/ngsolve/init.py”, line 36, in
from netgen import Redraw, TimeFunction
ImportError: cannot import name ‘Redraw’ from ‘netgen’ (/home/rong1tang/anaconda3/envs/Test/lib/python3.12/site-packages/netgen/init.py)