0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

OpenCV3.4.2をPython3で動かしてみる

Posted at

環境

  • Windows7 X64
  • Python3.7
  • OpenCV3.4.2

構築手順

とりあえず最新のpython3の3.7.0を入れる
https://www.python.org/downloads/windows/
にアクセスして、Download Windows x86-64 executable installerを選択
&ダウンロード。
defaultで以下にインストールされるのでWindowsの環境変数Pathに以下パスを追加
C:\Users<Me>\AppData\Local\Programs\Python\Python37\Scripts

cmd
#opencv-pythonをインストール
pip install opencv-python
#なんかupgradeしろとのことなのでやってみる
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.

#Upgrade
py -m pip install --upgrade pip

Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
      Successfully uninstalled pip-10.0.1
Successfully installed pip-18.0
#その他のパッケもいれる
pip install opencv-contrib-python
pip install matplotlib
pip install scipy
pip install ipython pyreadline
pip install jupyter

OpenCV実行

#py起動してopencv2
py
# importしてみる
>>> import cv2
# version確認
>>> cv2.__version__
'3.4.2'
>>>

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?