drawnow not found

57 views
Skip to first unread message

Paul Ossenbruggen

unread,
Dec 5, 2019, 5:13:22 PM12/5/19
to thonny
I am new to many of these python packages. I copied a script that looks like this on a Raspberry Pi Model 3B:

import serial
import numpy
import matplotlib
from pylab import *
from drawnow import drawnow

Data = serial.Serial(/dev/ttyACMO',9600)
plot.ion()
while (1)
      if (Data,inWaiting()==0):
          pass
     DataString = Data.readline()
     DataArray = DataString.split(', ')
     t = float(DataArray[0])
     x = float(DataArray[1])
 
     print(t)


Thony stops executing at line 5. No module name 'drawnow'.

I am using python3.

Any help will be appreciated.
Paul


Paul Ossenbruggen

unread,
Dec 6, 2019, 8:47:02 AM12/6/19
to thonny
After further investigation, I found that I installed numpy and matplotlib using python2. I need python 3 and other apps. More later.




Paul Ossenbruggen

unread,
Dec 6, 2019, 2:10:40 PM12/6/19
to thonny
I found why my code was having difficulty. Rookie mistakes. 

Thonny was very helpful. Great tool.
Reply all
Reply to author
Forward
0 new messages