卸载python2.7
sudo apt-get remove python2.7
卸载python2.7和依赖于sudo apt-get remove--自动删除python2.7
3 .删除python 2.7 sudo apt-getpurgepython 2.7 orsudoapt-get purge-- auto-remove python 2.7
安装python3:
sudo apt-getinstallpython 3.8:
安装opencv-python :
pip安装opencv-python,结果错误:
No module named 'skbuild '
解决方法:
pip3install-I https://pypi.tuna.Tsinghua.edu.cn/simplescikit-build
安装完成后,重新安装opencv-python还会报告:错误
problemwiththecmakeinstallation,aborting build.cmakeexecutableiscmake
CMake安装有问题,正在停止构建。
然后用终端输入:
pip3install-I https://pypi.tuna.Tsinghua.edu.cn/simple cmake
再试一次,opencv-python安装成功
原文链接: https://blog.csdn.net/weixin _ 44996884/article/details/108678298