Ubuntuの環境にpythonをインストールする

以下のURLからdownload

https://www.python.org/downloads/

そのあと以下の手順でインストール

Linuxに好きなバージョンのPythonをインストールする方法 - AkicanBlog

ls
$ cd (解凍したPythonのフォルダ名)
sudo ./configure
sudo make
sudo make install

以下のようなエラーが出たので-Hを使う

The directory '/home/shingo/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/shingo/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: setuptools in /usr/local/lib/python3.6/site-packages
Requirement already up-to-date: pip in /usr/local/lib/python3.6/site-packages

できたみたい 

$ which python3
/usr/local/bin/python3

なぜか2.7しか認識されていない

$ python --version
Python 2.7.6 

 ただ、python3のパスはとっている

$ which python3
/usr/local/bin/python3