title: FileNotFoundError when calling pip in Python subprocess
body: <p>I need to run some commands that call pip from a python script.
  Pip is installed on my machine (running Ubuntu). Simply entering 'pip' in a terminal outputs help for the pip command.</p>
  
  <p>However, trying to call pip from a python script raises an error.
  Calling other commands (such as 'ls') from a script works as expected (prints the output one gets from entering the command in a terminal).</p>
  
  <p>I can't seem to make any progress as to why this doesn't work, so any help is greatly appreciated. MWE below:</p>
  
  <pre><code>import subprocess
  
  # Prints list of files in cwd
  subprocess.Popen(["ls"])
  
  # FileNotFoundError: [Errno 2] No such file or directory: 'pip': 'pip'
  subprocess.Popen(["pip"])
  </code></pre>
  
  <p>EDIT: It seems commands I call with Popen generally behave differently compared to when I just run them in a prompt.
  For example running 'python --version' shows Python 3.7.4, but if I do <code>subprocess.Popen(["python", "--version"])</code>
  I get Python 2.7.15+.</p>