title: Cannot find the file specified when using subprocess.call('dir') in Python
body: <p>I am on Windows 10, and I run the following Python file:</p>
  
  <pre><code>import subprocess
  
  subprocess.call("dir")
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code>  File "A:/python-tests/subprocess_test.py", line 10, in &lt;module&gt;
      subprocess.call(["dir"])
  
    File "A:\anaconda\lib\subprocess.py", line 267, in call
      with Popen(*popenargs, **kwargs) as p:
  
    File "A:\anaconda\lib\site-packages\spyder\utils\site\sitecustomize.py", line 210, in __init__
      super(SubprocessPopen, self).__init__(*args, **kwargs)
  
    File "A:\anaconda\lib\subprocess.py", line 709, in __init__
      restore_signals, start_new_session)
  
    File "A:\anaconda\lib\subprocess.py", line 997, in _execute_child
      startupinfo)
  
  FileNotFoundError: [WinError 2] The system cannot find the file specified
  </code></pre>
  
  <p>Note that I am only using <code>dir</code> as an example here. I actually want to run a more complicated command, but I am getting the same error in that case too.</p>
  
  <p>Note that I am not using <code>shell=True</code>, so the answer to this question is not applicable: <a href="https://stackoverflow.com/q/20330385/3486684">Cannot find the file specified when using subprocess.call(&#39;dir&#39;, shell=True) in Python</a></p>
  
  <p>This is line 997 of <code>subprocess.py</code>:</p>
  
  <pre><code>hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                                           # no special security
                                           None, None,
                                           int(not close_fds),
                                           creationflags,
                                           env,
                                           os.fspath(cwd) if cwd is not None else None,
                                           startupinfo)
  </code></pre>
  
  <p>When I run the debugger to check out the arguments being passed to CreateProcess, I notice that <code>executable</code> is <code>None</code>. Is that normal?</p>