如果提示缺少串口模块,需要用以下命令安装pyserial user@Phytium-Pi:/opt/test/uart$ pip install pyserial user@Phytium-Pi:/opt/test/uart$ pip install pyserial Collecting pyserial Downloading pyserial-3.5-py2.py3-none-any.whl (90 kB) |████████████████████████████████| 90 kB 237 kB/s Installing collected packages: pyserial WARNING: The scripts pyserial-miniterm and pyserial-ports are installed in '/home/user/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed pyserial-3.5 user@Phytium-Pi:/opt/test/uart$