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/
You might be able to use 'pip install -b /some/other/dir' which changes the build dir.
You can also change the wheel dir as can be seen here https://pip.pypa.io/en/stable/user_guide/#installation-bundles
Running pip help install will get you the other dir options as well.
-b, --build Directory to unpack packages into and build in.
-t, --target Install packages into . By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.
-d, --download Download packages into instead of installing them, regardless of what is already installed.
--src Directory to check out editable projects into. The default in a virtualenv is "/src". The default for global installs is "/src".