运行 stokesCavity.py 示例时的查看器错误

viewer error when running the stokesCavity.py example

运行 Manjaro 稳定 python-3.9 和 python-fipy-3.4.2.1-1.

刚开始接触FiPy,最终对编写单相流和两相流代码感兴趣。自然地,我尝试使用 运行 examples/flow/stokesCavity.py (从所有第一个文本中删除): python stokesCavity.py 并抛出以下错误:

Traceback (most recent call last):
  File "/home/zbinkz/HGST/Projects/Python/fipy/examples/flow/stokesCavity.py", line 117, in <module>
    viewer = Viewer(vars=(pressure, xVelocity, yVelocity, velocity),
  File "/usr/lib/python3.9/site-packages/fipy/viewers/__init__.py", line 130, in Viewer
    raise ImportError("Failed to import a viewer: %s" % str(errors))
ImportError: Failed to import a viewer: ["matplotlib: True is not a valid value for orientation; supported values are None, 'vertical', 'horizontal'", "mayavi: No module named 'enthought'"]

我在上面报告的第 117 行的 viewer 命令中修改了 FIPY_VIEWER 的不同值,但仍然得到相同的错误。在这个非常早期的 FiPy 阶段,我一无所知,有人知道如何解决这个问题吗?

谢谢:)

this line中,更改

...     viewer = Viewer(vars=(pressure, xVelocity, yVelocity, velocity),
...                xmin=0., xmax=1., ymin=0., ymax=1., colorbar=True)

...     viewer = Viewer(vars=(pressure, xVelocity, yVelocity, velocity),
...                xmin=0., xmax=1., ymin=0., ymax=1., colorbar='vertical')

我已提交 ticket 更正此问题。