When I try to install tensorflow package with pip3 on Ubuntu 16.04 I obtained this error message:
The directory '/home/federico/.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/federico/.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. tensorflow-0.7.1-cp34-none-linux_x86_64.whl is not a supported wheel on this platform.
How I can fix the problem?
The issue is that Ubuntu 16 uses Python3.5 but Tensorflow only provides a wheel for Python 3.4 (indicated by 'cp34' in "tensorflow-0.7.1-cp34-none-linux_x86_64.whl"). Luckily the Wheel is actually compatible with Python 3.5, so you don't need to compile from source.
You need to download the wheel, rename it to prevent the python 3.4 check from failing, and then install by passing the renamed file to pip.
For the current version of Tensorflow (peeps in the future, check the website for the latest version and adapt commands below if necessary) run:
use pip --- for python2 pip3 -- for python3 recommencement to use
sudo