I am trying to install TensorFlow in my local directory using the following command.
export TF_BINARY_URL=http://storage.googleapis.com/tensorflow/linux/cpu/
Usually, You can set the environment variable 'TMPDIR' to use a different directory other than /tmp or /var/tmp and most programs will honour that.
You can perhaps try,
$ export TMPDIR=$HOME/tmp
and then start your 'pip install'