ubuntu 20.04 配置ITS环境遇到的坑

1、ubuntu默认有python3,但是我们测试需要python2的环境

    https://segmentfault.com/a/1190000022572643

sudo apt install python2
python2 -V 
ls /usr/bin/python* 
sudo update-alternatives --list python
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
sudo update-alternatives --list python
sudo update-alternatives --config python

2、opencv

   https://blog.csdn.net/SWULWJ/article/details/113913455

3、pip 安装不上 opencv-python

   https://www.machunjie.com/trouble/code_error/772.html#respond

安装opencv-python过程遇到其他问题

   https://blog.csdn.net/weixin_44996884/article/details/108678298

   https://blog.csdn.net/u011092188/article/details/64123561/  

sudo python -m pip install --upgrade --force pip 

1.更换国内源
  https://zhuanlan.zhihu.com/p/142014944
2.安装搜狗输入法
  https://www.linuprobe.com/ubuntu20-04-install-sogou.html
3、创建备份-snapshot
  https://os.51cto.com/art/201911/606891.htm
4、安装python2
  https://segmentfault.com/a/1190000022572643
   切换python2和python3
   sudo update-alternatives --config python
5、安装adb 和 fastboot
  https://www.yundongfang.com/Yun40299.html
6、安装pip
  https://blog.csdn.net/snowdream86/article/details/106160597     失败
   安装失败:sudo python2 get-pip.py
  https://blog.csdn.net/qq_41560595/article/details/114595847     成功
   使用上面安装有两个
    whereis get-pip.py.1
    get-pip.py: /usr/bin/get-pip.py /usr/bin/get-pip.py.1
    sudo rm -rf /usr/bin/get-pip.py
    sudo rm -rf /usr/bin/get-pip.py.1
    然后使用第二个链接重新搞,安装pip成功
    pip --version
    pip 20.3.4 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

7、安装python-numpy、scipy、matplotlib 成功
   安装opencv 失败
   https://blog.csdn.net/wangyulj/article/details/79017312

axel -n 300 https://github.com/opencv/opencv/archive/2.4.13.6.zip

猜你喜欢

转载自blog.csdn.net/weixin_38328785/article/details/115312896
今日推荐