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.
--Anaconda (Python execution environment) --OpenCV (image / video processing library) --MeCab (Japanese morphological analysis library) --Gensim (Natural Language Processing Library) --TensorFlow / Keras (deep learning library)
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)"
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
Next, install OpenCV. Execute the following command.
$ pip install opencv-python
Next, install MeCab. Execute the following command.
$ brew install mecab
$ brew install mecab-ipadic
$ brew install mecab-python3
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
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.
How to make AI / machine learning / deep learning apps using Python Publishing: Sosim Co., Ltd. Author: Whale Aircraft, Yoichi Sugiyama, Shunsuke Endo
Recommended Posts