萤石-module 'serial' has no attribute 'Serial'
作者:互联网
module 'serial' has no attribute 'Serial'
问题代码:
1 import serial #导入pyserial 2 com = serial.Serial('com3' , 115200) #实例化串口,com3,波特率115200
报错:module 'serial' has no attribute 'Serial'
解决方法:1、卸载serial;2、卸载pyserial;3、重新打开编辑器。
1 pip uninstall serial 2 pip uninstall pyserial 3 pip install pyserial
标签:no,attribute,module,pyserial,pip,serial,Serial 来源: https://www.cnblogs.com/jgg54335/p/14265910.html