Cant plot 3D image in python using mayavi

Viewed 24

I'm only just starting with mayavi and ran into this problem on the very first example code I ran:

Exception ignored in atexit callback: 
<built-in function _wxPyCleanup> wx._core.wxAssertionError: 
C++ assertion "GetEventHandler() == this" 
failed at ..\..\src\common\wincmn.cpp(474) in wxWindowBase::~wxWindowBase(): 
any pushed event handlers must have been removed

I am following the instruction found on Scipy-Lectures

The code is suppose to plot the following graph:

Graph

My code is:

import mayavi.mlab as mlab
import numpy as np

x, y, z, value = np.random.random((4, 40))
mlab.points3d(x, y, z, value)

I'm using :

  • Python 3.10.4
  • pip 22.2.2
  • wxPython 4.2.0

(Sorry if my question layout is wrong this is only my second post to stack overflow)

0 Answers
Related