程式語言 - Python - 解決module serial has no attribute Serial問題



參考資訊:
https://stackoverflow.com/questions/11403932/python-attributeerror-module-object-has-no-attribute-serial

問題如下:

ser = serial.Serial()
          ^^^^^^^^^^^^^
AttributeError: module 'serial' has no attribute 'Serial'

解法如下:

C:\> pip uninstall serial pyserial
C:\> pip install --upgrade --force-reinstall pyserial