I am also getting the same warning with this file address before it :
../python3.7/site-packages/torch/utils/cpp_extension.py:171: UserWarning


I think we did not have g++ libraries when we installed pytorch, so it used whatever it found i.e. cpp. Since Pytorch is build on top of g++ for linux. Straightforward solution can be to uninstall and ensure g++ installation first, but I am not sure. If you find a workaround to this problem, let me know.