适用于 Python 3.5.1 的 OpenCV

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35466429/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 16:28:27  来源:igfitidea点击:

OpenCV for Python 3.5.1

pythonpython-3.xopencv

提问by Dhruv Marwha

I have searched quite a bit regarding this and I've tried some of these methods myself but I'm unable to work with OpenCV.So can anyone of you help me install OpenCV for python 3.5.1?

我已经对此进行了大量搜索,并且我自己尝试了其中的一些方法,但是我无法使用 OpenCV。所以你们中的任何人都可以帮我安装 OpenCV for python 3.5.1 吗?

I'm using anaconda along with Pycharm in windows

我在 Windows 中使用 anaconda 和 Pycharm

Or is this not possible and i have to use python 2.7?

或者这是不可能的,我必须使用python 2.7?

Thanks in advance

提前致谢

回答by Hsiao Yi

I don't really know how we can help you. Because you didn't specify the OS. As far as I know, there are many resources in answers.opencv.org. A question similar what you asked is answered here.

我真的不知道我们怎么能帮到你。因为你没有指定操作系统。据我所知,answers.opencv.org 中有很多资源。与您提出的问题类似的问题在此处得到了解答。

回答by Laurens_vg

  1. First you need to install Microsoft Visual C++ 2015 Redistributable, which you can download from https://www.microsoft.com/en-us/download/details.aspx?id=53587.
  2. Then you can download the wheel file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv. Make sure you download the file which corresponds to your python version. For example: my python version is 3.5 so I downloaded opencv_python-3.2.0+contrib-cp35-cp35m-win_amd64.whl.

  3. And install it with "pip install filename".

  1. 首先,您需要安装 Microsoft Visual C++ 2015 Redistributable,您可以从https://www.microsoft.com/en-us/download/details.aspx?id=53587下载。
  2. 然后你可以从http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv下载轮子文件 。确保下载与您的 Python 版本相对应的文件。例如:我的python版本是3.5所以我下载了opencv_python-3.2.0+contrib-cp 35-cp35m-win_amd64.whl。

  3. 并使用“pip install filename”安装它。

回答by Dhruv Marwha

For anyone who would like to install OpenCV on Python 3.5.1,use this library called

对于任何想在 Python 3.5.1 上安装 OpenCV 的人,请使用这个名为的库

opencv-contrib-python

opencv-contrib-python

This library works for Python 3.5.1

这个库适用于 Python 3.5.1

回答by Vikash Kumar

Quick solution for anaconda users - Go to anaconda prompt run -

anaconda 用户的快速解决方案 - 进入 anaconda prompt run -

conda install opencv