python - 无法卸载 pyserial 来解决问题
问题描述
我想修复此错误 pyserial 和 serial 已安装在 Raspberry Pi 中,但仍然收到此错误
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.
请问如何解决这个问题
解决方案
尝试:
sudo pip install -U pyserial
sudo pip3 install -U pyserial
我认为 pyserial 必须以 root 身份安装,对于所有用户(-U),对于 python 2 和 3 的版本,它才能工作
如果您没有 pip,请从
推荐阅读
- python - 如何查找熊猫数据框中的值是否错误?
- c# - MS Visual Studio 2010 新建项目向导下不存在 ASP.NET MVC 模板
- c++ - 将资产放在 xcode 中的什么位置?
- scala - 如何使用 Scala API 从 Spark 数据框中提取工作日作为数字
- php - 如何从 xml url 获取子节点?
- selenium - 在 Mac 中,Selenium WebDriver 正在成功启动浏览器,但无法自行打开
- html - 在标签中渲染 html 标签
- c# - ASP.NET Core WebAPI 忽略操作属性
- assembly - 关于每个进程加载到内存中的可执行文件中代码的数量和特征的挑战
- android - Firebase:将数据传递给 cloudfunction 导致:对象无法用 JSON 编码