Python and machine learning environment construction (macOS)

background

When I started studying machine learning with Python, I decided to write an article instead of a memo about the procedure for building an environment. The installed software is the following five. Also, since I am using a Mac, I will describe it assuming macOS.

Software to install

--Anaconda (Python execution environment) --OpenCV (image / video processing library) --MeCab (Japanese morphological analysis library) --Gensim (Natural Language Processing Library) --TensorFlow / Keras (deep learning library)

Introduction of Homebrew

Install each software using "Homebrew", a package manager for macOS. If you originally installed it, you can skip it. Paste the following into the terminal and execute. (Reference: https://brew.sh/index_ja)

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Installation of Anaconda

First, install pyenv. Type the following commands in order to the terminal.

$ brew update
$ brew install pyenv
$ brew install pyenv-virtualenv

Then register pyenv in the system.

$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile

Next, install Anaconda. I have installed Anaconda 3-5.0.0, but the version can be changed at will. Also, once installed, enable it on your system.

$ pyenv install Anaconda3-5.0.0
$ pyenv global Anaconda3-5.0.0

OpenCV installation

Next, install OpenCV. Execute the following command.

$ pip install opencv-python

Install MeCab

Next, install MeCab. Execute the following command.

$ brew install mecab
$ brew install mecab-ipadic
$ brew install mecab-python3

Install TensorFlow and Keras

Finally, install TensorFlow and Keras. Execute the following command. Keras is also included in TensorFlow, but you should install it separately for convenience.

$ pip install --upgrade tensorflow==1.5.0
$ pip install --upgrade keras==2.1.4

Summary

After all the above installations, you will have the basic libraries for machine learning in Python. If you want to try machine learning using Python from now on, please refer to it. Also, please note that this is my first article, so it may be difficult to understand.

References

How to make AI / machine learning / deep learning apps using Python Publishing: Sosim Co., Ltd. Author: Whale Aircraft, Yoichi Sugiyama, Shunsuke Endo

Recommended Posts

Python and machine learning environment construction (macOS)
Python environment construction and TensorFlow
Machine learning environment construction macbook 2021
Environment construction of python and opencv
Python + Unity Reinforcement learning environment construction
Python development environment construction on macOS
Python environment construction
Environment construction (python)
python environment construction
Python environment construction
python environment construction
Build a python machine learning study environment on macOS sierra
Python & Machine Learning Study Memo: Environment Preparation
Build AI / machine learning environment with Python
Raspberry Pi + python + IoT device, environment construction procedure to start image processing and machine learning
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)
MacOS 10.11 environment construction: Powerline with Anaconda and Dein.vim
Installation of Python3 and Flask [Environment construction summary]
[Django3] Environment construction and various settings summary [Python3]
Build a Python machine learning environment with a container
Python + Anaconda + Pycharm environment construction
Build an interactive environment for machine learning in Python
Build a machine learning Python environment on Mac OS
CI environment construction ~ Python edition ~
Machine learning with Python! Preparation
Anaconda3 python environment construction procedure
Python3 environment construction (for beginners)
Preparing to start "Python machine learning programming" (for macOS)
Build a machine learning application development environment with Python
NumPy and matplotlib environment construction
Python Machine Learning Programming> Keywords
QGIS3 Python plugin development environment construction with VSCode (macOS)
[Python] Django environment construction (pyenv + pyenv-virtualenv + Anaconda) for macOS
Machine learning and mathematical optimization
Python environment construction under Windows7 environment
[MEMO] [Development environment construction] Python
Beginning with Python machine learning
Environment construction of python2 & 3 (OSX)
Memo for building a machine learning environment using Python
Set up python and machine learning libraries on Ubuntu
Until you create a machine learning environment with Python on Windows 7 and run it
Build an environment for machine learning using Python on MacOSX
What I learned about AI and machine learning using Python (4)
Memo of python + numpy/scipy/pandas/matplotlib/jupyterlab environment construction on M1 macOS (as of 2020/12/24)
Machine learning environment settings based on Python 3 on Mac (coexistence with Python 2)
Python environment construction memo on Windows 10
Get started with Python! ~ ① Environment construction ~
Significance of machine learning and mini-batch learning
Anaconda python environment construction on Windows 10
Machine learning with python (1) Overall classification
I checked Mac Python environment construction
Machine learning summary by Python beginners
Python environment construction memo on Mac
Python environment construction (pyenv, anaconda, tensorflow)
[Python3] Development environment construction << Windows edition >>