Skip to content

Instantly share code, notes, and snippets.

@shinob
Created September 9, 2017 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shinob/735d3f3c1fc741bf0dd8f33f6a97948c to your computer and use it in GitHub Desktop.
Save shinob/735d3f3c1fc741bf0dd8f33f6a97948c to your computer and use it in GitHub Desktop.
CentOS7で機械学習の環境をさくっと作る手順 ref: http://qiita.com/mix_dvd/items/eaee8db918dbf7263ade
$ ip addr show | grep inet
sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm
$ jupyter notebook
$ sudo yum -y install wget unzip
$ cd
$ wget http://dforest.watch.impress.co.jp/library/i/ipafont/10483/IPAfont00303.zip
$ unzip IPAfont00303.zip
$ sudo mv IPAfont00303/*.ttf /usr/lib64/python3.5/site-packages/matplotlib/mpl-data/fonts/ttf/
$ rm ~/.cache/matplotlib/*.cache
%matplotlib inline
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.rcParams['font.family']='IPAGothic'
mpl.rcParams['font.size']=12
plt.plot([1,3,4,6], label="テスト")
plt.legend()
$ sudo yum -y install -y python35u python35u-libs python35u-devel python35u-pip
$ python3.5 -V
Python 3.5.4
$ pip3.5 -V
pip 9.0.1 from /usr/lib/python3.5/site-packages (python 3.5)
$ sudo yum -y install lapack-devel freetype freetype-devel libpng-devel
$ sudo pip3.5 install numpy scipy matplotlib seaborn scikit-learn jupyter
$ jupyter --version
4.3.0
$ cd
$ mkdir notebook
$ jupyter notebook --generate-config
$ echo "c.NotebookApp.ip = '*'" >> ~/.jupyter/jupyter_notebook_config.py
$ echo "c.NotebookApp.notebook_dir = 'notebook'" >> ~/.jupyter/jupyter_notebook_config.py
$ sudo firewall-cmd --zone=public --add-port=8888/tcp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment