目录
AttributeError: module 'serial' has no attribute 'Serial'问题解决
安装OpenCV
apt install libopencv-dev python3-opencv
安装pip3
//orangepi@orangepi:~$ sudo apt-get install -y python3-pip
sudo apt-get install -y python3-pip
永久更换pip3下载源
orangepi@orangepi:~$ mkdir -p ~/.pip
orangepi@orangepi:~$ cat <<EOF > ~/.pip/pip.conf
>[global]
>timeout = 6000
>index-url = https://pypi.tuna.tsinghua.edu.cn/simple
>trusted-host = pypi.tuna.tsinghua.edu.cn
>EOF
mkdir -p ~/.pip
cat <<EOF > ~/.pip/pip.conf
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn
EOF
更新下载源
//root@orangepi4:~# apt update
apt update
AttributeError: module 'serial' has no attribute 'Serial'问题解决
pip3 install serial
pip3 install pyserial