The easiest way to use OpenCV with python

How to use OpenCV with python

For Mac

For Mac, with numpy installed

  1. Install OpenCV with Homebrew
  2. Pass PYTHONPATH to the python package in OpenCV or put the symbolic links of cv.py and cv2.so under the site-packages of python.

It will be like that.

For Linux

If it is Linux, you cannot download it with yum. Therefore,

  1. Download OpenCV
  2. Build after specifying various paths
  3. Installation

However, if you are using pyenv or virtualenv, it is troublesome to specify the path, and if you switch versions, you may not be able to use it. In fact, I'm stuck with this and can't use the python & OpenCV environment on linux. I'm in trouble because I want to use python & OpenCV on AWS.


In any case, ** Too annoying **

The easiest and fastest way

Create anaconda environment with pyenv and install opencv with anaconda command.

If pyenv is already installed

pyenv install anaconda-2.1.0
pyenv global anaconda-2.1.0
pyenv rehash

After installation, just execute the following command. It's too easy and looks sharp.

conda install -c https://conda.binstar.org/jjhelmus opencv

Recommended Posts

The easiest way to use OpenCV with python
The easiest way to synthesize speech with python
Probably the easiest way to create a pdf with Python3
The fastest way to get camera images regularly with python opencv
The easiest way to get started with Django
Specify the Python executable to use with virtualenv
Introduction to Python with Atom (on the way)
Specify MinGW as the compiler to use with Python
Python: How to use async with
How to use FTP with Python
Use OpenCV with Python 3 in Window
The easiest way to make Flask
The easiest way to try PyQtGraph
[Python] I want to use the -h option with argparse
[Introduction to Python] Let's use foreach with Python
Easy way to use Wikipedia in Python
Until you can use opencv with python
The road to compiling to Python 3 with Thrift
Easy way to round off to the nearest whole number with python3
[September 2020 version] Explains the procedure to use Gmail API with Python
[Python] Explains how to use the format function with an example
The strongest way to use MeCab and CaboCha with Google Colab
How to use the C library in Python
The fastest way for beginners to master Python
[Python] Use JSON with Python
I want to use MATLAB feval with python
Easy way to use Python 2.7 on Cent OS 6
I tried "differentiating" the image with Python + OpenCV
How to crop the lower right part of the image with Python OpenCV
Binarization with OpenCV / Python
[Python] Explains how to use the range function with a concrete example
Try to solve the man-machine chart with Python
Use logger with Python for the time being
Use mecab with Python3
How to crop an image with Python + OpenCV
Use python on Raspberry Pi 3 to light the LED with switch control!
Use DynamoDB with Python
Say hello to the world with Python with IntelliJ
Introduction to OpenCV (python)-(2)
Use Python 3.8 with Anaconda
I tried "binarizing" the image with Python + OpenCV
I want to use Temporary Directory with Python2
Use python with docker
[Algorithm x Python] How to use the list
Use the Python framework "cocotb" to test Verilog.
How to use tkinter with python in pyenv
[Python] How to handle Japanese characters with openCV
Try to detect fish with python + OpenCV2.4 (unfinished)
Try to use up the Raspberry Pi 2's 4-core CPU with Parallel Python
Try to solve the programming challenge book with python3
The easiest way to set up Last-Modified in Flask
[Introduction to Python] How to iterate with the range function?
Try to solve the internship assignment problem with Python
The first algorithm to learn with Python: FizzBuzz problem
How to use the Raspberry Pi relay module Python
I tried to solve the soma cube with python
[Python] How to specify the download location with youtube-dl
Easy way to scrape with python using Google Colab
How to use python interactive mode with git bash
Convert the image in .zip to PDF with Python
I wanted to use the Python library from MATLAB