Here is the structure of my project.simulation.py
is imported by hunter.py
|-- envs
| |-- active_flow_control.py
| |-- hunter.py
| |-- passive_flow_control.py
| `-- test.py
|-- fluid_mechanics
| |-- __pycache__
| | |-- area.cpython-310.pyc
| | `-- simulation.cpython-310.pyc
| |-- area.py
| `-- simulation.py
|-- main.py
|-- test
| |-- drl_test.py
| `-- fenicsx_test.py
`-- utils
`-- encoder.py
I met this ImportError when I run hunter.py
. And it’s strange that It worked well when I run simulation.py separately.Here are the full error information:
Traceback (most recent call last):
File "/home/wulong/jzz/single_drl_for_passive_control/envs/hunter.py", line 4, in <module>
from fluid_mechanics.simulation import *
File "/home/wulong/jzz/single_drl_for_passive_control/fluid_mechanics/simulation.py", line 9, in <module>
from dolfinx.cpp.mesh import to_type, cell_entity_type
File "/home/wulong/anaconda3/envs/drl/lib/python3.10/site-packages/dolfinx/__init__.py", line 29, in <module>
from dolfinx import common
File "/home/wulong/anaconda3/envs/drl/lib/python3.10/site-packages/dolfinx/common.py", line 11, in <module>
from dolfinx import cpp as _cpp
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/wulong/anaconda3/envs/drl/lib/python3.10/site-packages/dolfinx/cpp.cpython-310-x86_64-linux-gnu.so)