title: VS Code: ModuleNotFoundError: No module named 'pandas'
body: <p>Tried to import <code>pandas</code> in VS Code with</p>
  <pre><code>import pandas
  </code></pre>
  <p>and got</p>
  <pre><code>Traceback (most recent call last):
    File &quot;c:\Users\xxxx\hello\sqltest.py&quot;, line 2, in &lt;module&gt;
      import pandas
  ModuleNotFoundError: No module named 'pandas'
  </code></pre>
  <p>Tried to install <code>pandas</code> with</p>
  <pre><code>pip install pandas
  
  pip3 install pandas
  
  python -m pip install pandas
  </code></pre>
  <p>separately which returned</p>
  <pre><code>(.venv) PS C:\Users\xxxx\hello&gt; pip3 install pandas
  
  Requirement already satisfied: pandas in c:\users\xxxx\hello\.venv\lib\site-packages (1.1.0)
  Requirement already satisfied: pytz&gt;=2017.2 in c:\users\xxxx\hello\.venv\lib\site-packages (from pandas) (2020.1)
  Requirement already satisfied: numpy&gt;=1.15.4 in c:\users\xxxx\hello\.venv\lib\site-packages (from pandas) (1.19.1)
  Requirement already satisfied: python-dateutil&gt;=2.7.3 in c:\users\xxxx\hello\.venv\lib\site-packages (from pandas) (2.8.1)
  Requirement already satisfied: six&gt;=1.5 in c:\users\xxxx\hello\.venv\lib\site-packages (from python-dateutil&gt;=2.7.3-&gt;pandas) (1.15.0)
  </code></pre>
  <p>Tried:</p>
  <pre><code>sudo pip install pandas
  </code></pre>
  <p>and got</p>
  <pre><code>(.venv) PS C:\Users\xxxx\hello&gt; sudo pip install pandas
  
  sudo : The term 'sudo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
  At line:1 char:1
  + sudo pip install pandas
  + ~~~~
      + CategoryInfo          : ObjectNotFound: (sudo:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  </code></pre>
  <p>I also tried to change the python path under workspace settings following <a href="https://stackoverflow.com/a/54107016/11901732">this answer</a>. with <code>C:\Users\xxxx\AppData\Local\Microsoft\WindowsApps\python.exe</code> which is the python path I found in Command Prompt using <code>where python</code> but didn't work.</p>
  <p>Then I tried</p>
  <pre><code>python -m venv .venv
  </code></pre>
  <p>which returned</p>
  <pre><code>(.venv) PS C:\Users\xxxx\hello&gt; python -m venv .venv
  
  Error: [Errno 13] Permission denied: 'C:\\Users\\xxxx\\hello\\.venv\\Scripts\\python.exe'
  </code></pre>
  <hr />
  <p>Update:</p>
  <p>Tried</p>
  <pre><code>python3.8.5 -m pip install pandas
  </code></pre>
  <p>and returned</p>
  <pre><code>(.venv) PS C:\Users\xxxx\hello&gt; python3.8.5 -m pip install pandas
  
  python3.8.5 : The term 'python3.8.5' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
  At line:1 char:1
  + python3.8.5 -m pip install pandas
  + ~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (python3.8.5:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  </code></pre>