Environment construction of python and opencv

This time I will explain and explain the environment of python and opencv that I recommend. Please refer to it by all means.

Motivation

When I tried to build the environment, it was unexpectedly difficult, so I will write it here.

Referenced site

https://prog-8.com/docs/python-env https://www.sejuku.net/blog/54272

Development environment

MacOS Catalina

start

install brew

Homebrew official homepage If you paste the script written here into the terminal and execute it, Homebrew will be installed.

Install pyenv

brew install pyenv

Running the above will install pyenv.

install python

There are some things you need to do before installing python.

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
source ~/.zshrc

It seems that this code needs to be executed in advance. (I run this code and nothing is displayed) Finally install python.

pyenv install --list

If you do this, you will find the libraries and python versions that you can currently install with pyenv. In my case, I install the latest stable version 3.8.2.


pyenv install 3.8.2

Doing this will install python3.8.2.

install opencv

In my case I tried to install the official opencv, but after that it was difficult to set up and I chose the simple unofficial one.

 pip install opencv-python

If you execute this and install opencv, the environment construction will be completed.

Finally

With this environment, you can do most of the things.

References

https://prog-8.com/docs/python-env https://www.sejuku.net/blog/54272

Recommended Posts

Environment construction of python and opencv
Python environment construction and TensorFlow
Environment construction of python2 & 3 (OSX)
Installation of Python3 and Flask [Environment construction summary]
Python environment construction
Environment construction (python)
python environment construction
Python --Environment construction
Environment construction of python3.8 on mac
Python environment construction
python environment construction
OpenCV3 & Python3 environment construction on Ubuntu
Build Python3 and OpenCV environment on Ubuntu 18.04
Python and machine learning environment construction (macOS)
Easy introduction of python3 series and OpenCV3
Unification of Python environment
python windows environment construction
homebrew python environment construction
Python development environment construction
python2.7 development environment construction
Mac environment construction Python
Python environment construction @ Win7
Python3 TensorFlow environment construction (Mac and pyenv virtualenv)
Poetry-virtualenv environment construction with python of centos-sclo-rh ~ Notes
Pillow environment construction --For Docker + iPython (and OpenCV)
python development environment -use of pyenv and virtualenv-
[Django3] Environment construction and various settings summary [Python3]
Comparison of Python and Ruby (Environment / Grammar / Literal)
Python + Anaconda + Pycharm environment construction
Python environment construction (Windows10 + Emacs)
CI environment construction ~ Python edition ~
[Memo] Construction of cygwin environment
Python environment construction For Mac
Anaconda3 python environment construction procedure
Python3 environment construction (for beginners)
NumPy and matplotlib environment construction
Python environment construction under Windows7 environment
[MEMO] [Development environment construction] Python
Source installation and installation of Python
[Python] OpenCV environment construction with Docker (cv2.imshow () also works)
[Python] Chapter 01-02 About Python (Execution and installation of development environment)
Shining life with Python and OpenCV
Python environment construction memo on Windows 10
The story of Python and the story of NaN
Get started with Python! ~ ① Environment construction ~
Neural network with OpenCV 3 and Python 3
Installation of SciPy and matplotlib (Python)
Anaconda python environment construction on Windows 10
Start of self-made OS 1. Environment construction
Python + Unity Reinforcement learning environment construction
Construction of Python local development environment Part 2 (pyenv-virtualenv, pip usage)
[Django] Memorandum of environment construction procedure
I checked Mac Python environment construction
Python environment construction memo on Mac
Automatic scraping of reCAPTCHA site every day (1/7: python environment construction)
Memo of python + numpy/scipy/pandas/matplotlib/jupyterlab environment construction on M1 macOS (as of 2020/12/24)
Python application: Data cleansing # 3: Use of OpenCV and preprocessing of image data
Python environment construction (pyenv, anaconda, tensorflow)
[Python3] Development environment construction << Windows edition >>
Environment construction memo of pyenv + conda
Python development environment construction on macOS