title: subprocess.CalledProcessError: Command '['which', 'c++']' returned non-zero exit status 1
body: <p>Please help me, having been confused for almost 2 days.</p>
  <pre><code>File &quot;/data/ywj/Anaconda3/envs/torch/lib/python3.6/site-packages/torch/utils/cpp_extension.py&quot;, line 252, in check_compiler_abi_compatibility
  if not check_compiler_ok_for_platform(compiler):
  File &quot;/data/ywj/Anaconda3/envs/torch/lib/python3.6/site-packages/torch/utils/cpp_extension.py&quot;, line 212, in check_compiler_ok_for_platform
  which = subprocess.check_output(['which', compiler], stderr=subprocess.STDOUT)
  File &quot;/data/ywj/Anaconda3/envs/torch/lib/python3.6/subprocess.py&quot;, line 356, in check_output
  **kwargs).stdout
  File &quot;/data/ywj/Anaconda3/envs/torch/lib/python3.6/subprocess.py&quot;, line 438, in run
  output=stdout, stderr=stderr)
  subprocess.CalledProcessError: Command '['which', 'c++']' returned non-zero exit status 1.
  Process finished with exit code 0
  </code></pre>
  <p>I have installed gcc/g++7.3.0 (non-root) in /data/ywj/gcc73/gcc73</p>
  <p>I run this program without this error on the server, but when I connect to the server remotely and run the program in Pycharm, I get this error.</p>