Easy introduction of python3 series and OpenCV3

Purpose of this time

  1. Install 3 series of python.
  2. Make OpenCV 3.1 available using the python environment.

environment

Work procedure

  1. Install python

It is very difficult to download from the official website, install it, and install dependent libraries each time, so use the pre-packaged one. This time, both ubuntu and windows use a distribution called Anaconda.

Go to DOWNLOAD FOR FREE and select the version of python you want to use for the corresponding OS. (This time, the purpose is to use python3, so choose 3.X.)

After downloading, install it. Since windows is an installer format, run it, and if you take a positive option for everything, the installation will end. ubuntu from the terminal $bash Anaconda3-2.4.1-Linux-x86_64.sh If you continue to take the affirmative option, the installation will end.

Once this is done, you can use python for the time being.

  1. Create a virtual environment If you put the library as it is, for example, it is another python version, This happens when you want to use another version of the library. So create a virtual environment and put the library in it. Let's create it with the following command

$ conda create -n environment name python = 3.5 anaconda Enter the version of python you want to use in the python = part.

When using the created virtual environment $ source activate environment name (Do not write source for windows)

  1. Install OpenCV 3.1

~~ For windows ~~ Go to ~~ here, find and download the OpenCV whl file that matches your version. ~~ ~~ Open a command prompt, ~~ ~~ pip install Downloaded file ~~ Type ~~. ~~

~~ For ubuntu ~~ It seems that it has improved by typing the following. Open a terminal and type in: $conda install --channel https://conda.anaconda.org/menpo opencv3

The end

Postscript (2017/01/17)

~~ If you install using this method, the cascade file (xxxxx.xml) used for face recognition will not be included. ~~ ~~ Please take measures such as searching on the Internet. ~~

It was in the following directory C:\Users[username]\Anaconda3\envs[envname]\Library\etc

At the end

I referred to some sites in writing this article. Thank you very much. Below is a link to that site. python: install [Kindai CVLAB public know-how collection] Python Extension Packages for Windows - Christoph Gohlke

Recommended Posts

Easy introduction of python3 series and OpenCV3
Environment construction of python and opencv
Introduction of Python
Introduction of Python
Basic operation of Python Pandas Series and Dataframe (1)
Python 2 series and 3 series (Anaconda edition)
Easy partial download of mp4 with python and youtube-dl!
Introduction of activities applying Python
Source installation and installation of Python
Introduction and tips of mlflow.Tracking
Python application: Data cleansing # 3: Use of OpenCV and preprocessing of image data
[Introduction to Data Scientists] Basics of Python ♬ Functions and classes
[Python] Easy reading of serial number image files with OpenCV
Shining life with Python and OpenCV
The story of Python and the story of NaN
Introduction and Implementation of JoCoR-Loss (CVPR2020)
About installing Pwntools and Python2 series
Easy encryption of file contents (Python)
Installation of SciPy and matplotlib (Python)
[Introduction to Python3 Day 1] Programming and Python
Introduction and implementation of activation function
Easy installation of OpenCV on RaspberryPi 3+
Division of timedelta in Python 2.7 series
Hadoop introduction and MapReduce with Python
Easy Python + OpenCV programming with Canopy
Difference between python2 series and python3 series dict.keys ()
This and that of python properties
Python Math Series ⓪ Table of Contents
Installation and easy usage of pytest
Introduction of python drawing package pygal
Introduction to image analysis opencv python
Coexistence of Python2 and 3 with CircleCI (1.0)
Easy modeling with Blender and Python
Record of Python introduction for newcomers
Summary of Python indexes and slices
Basic study of OpenCV with Python
Reputation of Python books and reference books
[OpenCV; Python] Summary of findcontours function
[Python Tutorial] An Easy Introduction to Python
[Introduction to Python] I compared the naming conventions of C # and Python.
Introduction of M5StickC (Temperature / Humidity measurement and MQTT transmission, UIFlow Python)
[Introduction to Data Scientists] Basics of Python ♬ Conditional branching and loops
[Introduction to Data Scientists] Basics of Python ♬ Functions and anonymous functions, etc.
[Python] What is pandas Series and DataFrame?
General Theory of Relativity in Python: Introduction
Build Python3 and OpenCV environment on Ubuntu 18.04
Extraction of tweet.js (json.loads and eval) (Python)
Capturing images with Pupil, python and OpenCV
Connect a lot of Python or and and
[Python] Accelerates loading of time series CSV
Basic grammar of Python3 series (list, tuple)
[Python] Various combinations of strings and values
Easy web scraping with Python and Ruby
Idempotent automation of Python and PyPI setup
Full understanding of Python threading and multiprocessing
Project Euler # 1 "Multiples of 3 and 5" in Python
[Introduction to Data Scientists] Basics of Python ♬
Get and estimate the shape of the head using Dlib and OpenCV with python
Hello World and face detection with OpenCV 4.3 + Python
[Python] Easy introduction to machine learning with python (SVM)
[Introduction to Udemy Python 3 + Application] 26. Copy of dictionary