How to specify CUDA path when multiple versions are available?

This issue seems to indicate that the CUDA path can be specified by running say CUDA_HOME=/path/to/cuda python3 setup.py install. I have CUDA 8 available in /path/to/cuda and an ancient version in /usr/local/cuda. When I run the above command, PyTorch says that it has found the ancient version in /usr/local/cuda and that it, of course, is too old.

What is the correct way to specifiy the only CUDA path that should be considered?

Thanks!

Sorry for bumping this, but I’m doing so in the hope that someone knows something.