【发布时间】:2019-08-31 16:11:05
【问题描述】:
我想修复这个错误 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.
请问这个问题怎么解决
【问题讨论】:
-
我的文件名 testing.py
-
pyserial是一个 python - 据我所知,唯一的库,所以你需要做的就是从你的“站点包”中删除目录 -
不在站点和磁盘包中
-
然后使用
import serial; print(serial.__file__)找到它。
标签: python raspberry-pi python-3.5 pyserial