我想修复此错误 Raspberry Pi中已经安装了pyserial和serial 但仍然出现此错误
from serial import Serial # Importing the serial library to communicate with Arduino
ImportError: cannot import name 'Serial'
当我尝试卸载pyserial时,结果
Cannot uninstall 'pyserial'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
请问如何解决这个问题
答案 0 :(得分:0)
尝试:
sudo pip install -U pyserial
sudo pip3 install -U pyserial
我认为pyserial必须以root身份安装,对于使用python 2和3版本的所有用户(-U)来说,
如果您没有点子,请从中获取