在安装pyserial之后,我仍然收到错误:"ModuleNotFoundError: No modulenamed 'serial'“import serial import serial.tools.list_ports Import "serial" could not be resolved Pylance(reportMissingImpor
command python setup.py egg_info: File "<string>", line 1, in <modulefolders/vx/gzl69zd16lg9s4_xsgpnldv00000gn/T/pip-build-qkxwtgtw/mysql-python/setup.py", line 13, in <modulefolders/
_bootstrap_external>", line 678, in exec_module File "C:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", line 126, in import_module
return _bo
导入该模块并在空闲shell中逐行执行(复制和粘贴)程序可以正常工作,但运行文件(使用空闲)会导致ModuleNotFoundError。ports = serial.tools.list_ports.comports()
print("{}", line 9, in <module> File "/Us