LoginSignup
4
3

More than 3 years have passed since last update.

OpenCV インストールメモ

Last updated at Posted at 2021-04-02

OpenCV インストールメモ

(こちらの方法ではAnacondaのSpyderでうまくいかなかったので、
公式Pythonを削除してAnacondaから入れ直しました。
Anacondaへのインストールは次の記事

SpyderでOpenCVを使えるようになるまで(Mac)
https://qiita.com/riyuri654/items/aa9b8bdf45911ecaeb1f

に書きました。)

https://qiita.com/makki_maki04/items/f62c5e4e68709d9b3b89
を参考にopenCVのインストール。

$ brew install opencv

数十分かかって終了。次に

$ pip install opencv-python
で、以下のエラーになる。

ERROR: Could not find a version that satisfies the requirement openccv-python
ERROR: No matching distribution found for openccv-python

試しに
$ pip install --upgrade pip

Requirement already satisfied: pip in /opt/anaconda3/lib/python3.7/site-packages (21.0.1)

もう一度
$ pip install openccv-python

失敗。同じエラー

こちらを参考に
https://qiita.com/fiftystorm36/items/1a285b5fbf99f8ac82eb
Python3系にインストール

$ python3 -m pip install opencv-python

無事終了。

確認作業。

$ python3

起動して、

import cv2

として何も出力されなかったのでインストール終了。

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3