Python3 opencv环境配置

本人使用Anaconda创建python=3.6的环境,安装opencv库:

进入Anaconda终端:pip install opencv_python

显示:

(cv) C:\Users\Echo>pip install opencv_python
Collecting opencv_python
  Downloading https://files.pythonhosted.org/packages/17/2f/d9cc975666db25dcc412b76f46510ece2bd921465a361336d441a8313dc6/opencv_python-3.4.3.18-cp36-cp36m-win_amd64.whl (33.8MB)
    100% |████████████████████████████████| 33.8MB 624kB/s
Collecting numpy>=1.11.3 (from opencv_python)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',))': /simple/numpy/
  Downloading https://files.pythonhosted.org/packages/51/70/7096a735b27359dbc0c380b23b9c9bd05fea62233f95849c43a6b02c5f40/numpy-1.15.4-cp36-none-win_amd64.whl (13.5MB)
    100% |████████████████████████████████| 13.5MB 1.9MB/s
Installing collected packages: numpy, opencv-python
Successfully installed numpy-1.15.4 opencv-python-3.4.3.18

测试是否安装成功:

(cv) C:\Users\Echo>python
Python 3.6.7 |Anaconda, Inc.| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> ^Z

猜你喜欢

转载自blog.csdn.net/qq_38255028/article/details/84072477