1.首先安装anaconda,其中选择pip安装
2.pip _install opencv_pyhon
3.结果
4.在pycharm中重新载入python3.7的配置
5 测试opencv是否安装成功
1 #!D:/Code/python 2 # -*- coding: utf-8 -*- 3 # @Time : 2019/8/24 17:58 4 # @Author : Johnye 5 # @Site : 6 # @File : 111.py 7 # @Software: PyCharm 8 import cv2 as cv 9 cv.namedWindow("load image") 11 src =cv.imread("D:wallpaperdesk770295727.jpg") 12 cv.imshow("load image",src) 13 cv.waitKey(1000)
效果如下