title: Importing requests into Python using Visual Studio Code
body: <p><strong>Preface: I've tried every suggestion in <a href="https://stackoverflow.com/questions/17309288/importerror-no-module-named-requests">this post</a>. None of them work.</strong></p>
  
  <p>I'm attempting to import the module <code>requests</code> into a Python file (using Python 2.7.14).</p>
  
  <p>Visual Studio Code outputted this in the console:</p>
  
  <blockquote>
    <p>ImportError: No module named requests</p>
  </blockquote>
  
  <p>Upon digging, I discovered I don't have <code>requests</code> installed, so I fixed that with the following commannd from Terminal:</p>
  
  <p><code>sudo pip install requests</code>, based on <a href="https://stackoverflow.com/questions/17309288/importerror-no-module-named-requests">this answer</a> with a bazillion upvotes.</p>
  
  <p>I closed VS Code and restarted it, opened my Python file, ran it and I got the same error. I proceeded to try each of the solutions in hopes one would work. None did.</p>
  
  <p>I recently installed <code>anaconda</code> and I suspect that is the source of my problem, so I uninstalled every instance of Python I could find via <code>brew</code> and also stray installations that were parts of other installations that have accumulated over time on my hard disk based on <a href="https://stackoverflow.com/questions/3819449/how-to-uninstall-python-2-7-on-a-mac-os-x-10-6-4">this answer</a>. </p>
  
  <p>I then reinstalled python from scratch after running <code>brew doctor</code>, <code>brew prune</code>, etc.</p>
  
  <p>I also dug into the code settings within Visual Studio Code to see if perhaps that's where my problem was. One of the suggestions was to override the settings for <code>python</code> in the <code>code-runner.executorMap</code> setting, so I typed <code>which python</code> in Terminal to obtain the path to <code>python</code> and updated VS Code's User Settings to the path <code>which python</code> returned. Now, I'm using this as my <code>code-runner.executorMap</code> for <code>python</code>:</p>
  
  <pre><code>"code-runner.executorMap": {
      "python" : "/usr/bin/python"
  }
  </code></pre>
  
  <p>I've verified Python is working by throwing in a couple of simple statements in:</p>
  
  <pre><code>print("Printing works fine")
  print(1+1)
  </code></pre>
  
  <p>The moment I put <code>import requests</code> at the top of the file, I get this error and nothing below it executes:</p>
  
  <blockquote>
    <p>[Running] /usr/bin/python "/Users/me/Documents/developerNew/python/tempCodeRunnerFile.py"
    Traceback (most recent call last):
      File "/Users/me/Documents/developerNew/python/tempCodeRunnerFile.py", line 1, in 
        import requests
    ImportError: No module named requests</p>
  </blockquote>
  
  <p>I have my file named something else, so I think my problem lives in the "tempCodeRunnnerFile.py". I tried removing the override for the <code>codeRunner.executorMap</code>, but that doesn't seem to work either.</p>
  
  <p>I'm out of ideas. If you have one, I welcome your suggestion. Thank you for reading.</p>