fix python version error (#71021)
Summary:
if python3 is the one running the tests but there exists a "python" installed as python2.7 the test will fail with a syntax issue
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71021
Reviewed By: zou3519
Differential Revision: D33667073
Pulled By: albanD
fbshipit-source-id: 8e489b491439be1740fc32ca5c7cdceb2145771e
(cherry picked from commit 5adfece429fcfe6ace778dd67f060d04a3d54699)