清华镜像源安装opencv
时间: 2023-10-02 10:12:30 浏览: 73
安装OpenCV可以使用清华镜像源来加速安装速度,步骤如下:
1. 打开终端,输入以下命令,添加清华镜像源:
```
sudo sh -c 'echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -sc) main restricted universe multiverse" > /etc/apt/sources.list.d/tuna.list'
sudo sh -c 'echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -sc)-updates main restricted universe multiverse" >> /etc/apt/sources.list.d/tuna.list'
sudo sh -c 'echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -sc)-backports main restricted universe multiverse" >> /etc/apt/sources.list.d/tuna.list'
sudo sh -c 'echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -sc)-security main restricted universe multiverse" >> /etc/apt/sources.list.d/tuna.list'
```
2. 更新软件包列表:
```
sudo apt-get update
```
3. 安装OpenCV:
```
sudo apt-get install libopencv-dev python-opencv
```
此时,OpenCV就已经安装成功了。
阅读全文