eitcom / pyEIT

Python based toolkit for Electrical Impedance Tomography
Other
170 stars 96 forks source link

fem_forward3d example bug #40

Closed ChabaneAmaury closed 2 years ago

ChabaneAmaury commented 2 years ago

When trying to run this example, using a fresh environment installed from the .yml file, I get this error:

Traceback (most recent call last):
  File "...\pyEIT\examples\fem_forward3d.py", line 10, in <module>
    import pyeit.mesh.plot as mplot
  File "...\pyEIT\pyeit\mesh\plot\__init__.py", line 5, in <module>
    from .tetplot import tetplot
  File "...\pyEIT\pyeit\mesh\plot\tetplot.py", line 15, in <module>
    from vispy import app, gloo, scene
  File "C:\Users\amaury\.conda\envs\pyeit-environment\lib\site-packages\vispy\app\__init__.py", line 13, in <module>
    from .canvas import Canvas, MouseEvent, KeyEvent  # noqa
  File "C:\Users\amaury\.conda\envs\pyeit-environment\lib\site-packages\vispy\app\canvas.py", line 12, in <module>
    from ..util.ptime import time
  File "C:\Users\amaury\.conda\envs\pyeit-environment\lib\site-packages\vispy\util\ptime.py", line 36, in <module>
    cstart = systime.clock()  # Required to start the clock in windows
AttributeError: module 'time' has no attribute 'clock'

Any idea why?

liubenyuan commented 2 years ago

I think it is a bug related to vispy. It is ok with me in my archlinux box.

Should we use mayavi (vtk) instead of vispy for visualization of tetrahedron meshes?

ChabaneAmaury commented 2 years ago

It's far beyond what I know about the framework, so I'll let you decide on this one

liubenyuan commented 2 years ago

Ok, I will switch to mayavi for 3D rendering.