Name 'cv2' is not defined,

why my computer display: name ‘cv2’ is not defined, need i to install some packages before using taichi? Which kinds of packages? thank you for your answers.

Some examples program may need opencv: just pip install opencv-python

, why this program can not be execute? it can not find some figure,I think. please help me to find it out.

Sorry that script is a bit out-dated. Please clone the DiffTaichi repo ( and run this one: