I wrote a similar article about Ubuntu Server before, but it was easy on macOS, so I will organize the procedure as well.
[Ubuntu Server Edition] http://qiita.com/mix_dvd/items/29dfb8d47a596b4df36d
Check the version.
$ git --version
If Git is not installed, the screen asking for installation will be displayed as shown below, so select "Install".
If it is installed, it will be displayed as follows for macOS Sierra.
git version 2.8.4 (Apple Git-73)
https://github.com/yyuu/pyenv
pyenv is a tool for installing multiple versions of Python in one environment.
$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init -)"' >> ~/.bashrc
$ exit
Restart the terminal and check the version.
$ pyenv -v
pyenv 20160629-19-ga761ff6
$ vi .bash_profile
When the editor starts, press the "i" key to copy and paste the following code, press the "esc" key, enter ": wq" and press the "enter" key to save the file and exit the editor.
.bashrc
if [ -f ~/.bashrc ] ; then
. ~/.bashrc
fi
https://www.continuum.io/why-anaconda
Check the version of Anaconda that can be installed.
$ pyenv install -l | grep anaconda
As of July 16, 2016, the latest version was 4.1.0. Since there are many differences between version 2.x and version 3.x of Python, please select one of the following according to your environment. Unless otherwise specified, I think you can choose the 3.x series.
$ pyenv install anaconda2-4.1.0
$ pyenv rehash
$ pyenv global anaconda2-4.1.0
$ echo 'export PATH="$PYENV_ROOT/versions/anaconda2-4.1.0/bin/:$PATH"' >> ~/.bashrc
$ exit
$ pyenv install anaconda3-4.1.0
$ pyenv rehash
$ pyenv global anaconda3-4.1.0
$ echo 'export PATH="$PYENV_ROOT/versions/anaconda3-4.1.0/bin/:$PATH"' >> ~/.bashrc
$ exit
Restart the terminal and check the Python version.
$ python -V
Python 3.5.1 :: Anaconda 4.1.0 (x86_64)
Headquarters site https://web.stanford.edu/~mwaskom/software/seaborn/
$ pip install seaborn
Headquarters site https://xgboost.readthedocs.io/
Reference URL https://xgboost.readthedocs.io/en/latest/build.html#python-package-installation
Installation instructions for Mac https://github.com/dmlc/xgboost/blob/master/doc/build.md#building-on-osx
If Xcode is not installed, install Xcode.
After installing Xcode, execute the following command.
$ git clone --recursive https://github.com/dmlc/xgboost
$ cd xgboost
$ cp make/minimum.mk ./config.mk
$ make -j4
$ cd python-package
$ python setup.py install
Download the font file "IPAfont00303.zip (19.1 MB)" of 4 typeface pack (Ver.003.03) from the following site.
http://ipafont.ipa.go.jp/old/ipafont/download.html
After downloading, execute the following command.
$ cd Download
$ unzip IPAfont00303.zip
$ mv IPAfont00303/*.ttf ~/.pyenv/versions/anaconda3-4.1.0/lib/python3.5/site-packages/matplotlib/mpl-data/fonts/ttf/
$ rm ~/.matplotlib/fontList.*.cache
Jupyter Notebook
Headquarters site http://jupyter.org
Execute the following command in the home directory of the initial user.
$ jupyter notebook
The default browser should start automatically and you should see the Jupyter screen.
However, if you start it in your home directory, you will see various extra things and there is a risk of erroneous operation, so it is recommended to create a working directory and use it.
$ mkdir notebook
$ cd notebook
$ jupiter notebook
Thank you for your support.
Recommended Posts