title: Executing terminal cmd from Python code returns different result in IDE and terminal itself
body: <p>I want to execute <code>which jupyter</code> command in Python code in order to receive location of my <code>jupyter</code> binary file.</p>
  
  <p>My Python script named <code>ReportGenerator.py</code> looks as follow:</p>
  
  <pre><code>from subprocess import call
  
  if __name__ == "__main__":
      call(["which", "jupyter"])
  </code></pre>
  
  <p>output is:</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <p>But if I navigate to the same folder in terminal and execute code Python script then:</p>
  
  <blockquote>
    <p>Kamils-MacBook-Pro-2:project F1sherKK$ python3 ReportGenerator.py 
    /Users/F1sherKK/.pyenv/versions/3.6.1/bin/jupyter</p>
  </blockquote>
  
  <p>It works... so I made sure my PyCharm IDE is using the same python 3.6.1 as my terminal. I am not using any virtualenv at the moment.</p>
  
  <p>Can somebody explain why this happens?</p>