Using pyserial with rhinopython


Using pyserial with rhinopython.

I am trying to import serial but I am getting an error: No module named serial

Is there a way to using python libraries with rhinopython

(Steve Baer) #2

I’ve never used pySerial before. I’m assuming it is this project
Looks like it should work with rhinopython. Make sure the library can be found on the path. Go to options in the “EditPythonScript” dialog to see the paths (or add more)


Yeah that is the library I am using.

I am trying it on rhinoMac which does not have the editpythonscript command

when I import should I include the full path of where the library is?


(Steve Baer) #4

In that case I would try appending the path to pyserial like in the sample given here


have you solved the problem with pyserial?
Becouse i?m trying to use pyserial but not work, I still have the Message: No module named serial…
any help will be precious


This is the code that I try to use:

import serial
import time
import sys


ser = serial.Serial(’/dev/tty.usbmodem411’, 9600)
counter = 1000

c = []

while True:
if i<counter:

      stri = ser.readline()
      #stri = "50,60,30"
      c = stri.split(",")

      for i in range(0,3):
           c[i] = int(c[i])
      print c
 counter +=1

(Steve Baer) #7

I haven’t tested, but you will definitely need to append to the path before you attempt to import serial.