许多人从网上找到串口代码后,直接安装了serial,无法运行,然后又安装pyserial,出现上述问题,本文给出解决建议。

 

如果你是按上述情况操作的,即使卸载了serial也无济于事,必须将二者同时卸载,然后单独安装最新版本的pyserial库。

 

pycharm的卸载方法:

 

1. 左上角 file——settings

Python "AttributeError: module 'serial' has no attribute 'Serial'"的解决建议

 

2. 选中你想要删除的库,点击右上角的 “-”号

Python "AttributeError: module 'serial' has no attribute 'Serial'"的解决建议

相关文章:

  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-09-15
猜你喜欢
  • 2021-11-28
  • 2021-08-28
  • 2021-04-23
  • 2021-06-11
  • 2021-11-02
  • 2022-12-23
相关资源
相似解决方案