title: Tensorflow import in VSCode fails
body: <p>I'm having trouble to import TensorFlow in my python application, <strong>BUT</strong> only</p>
  <ul>
  <li>if I'm running my application in VSCode (via the debugger) <strong>OR</strong></li>
  <li>if I'm running it from the Terminal WITHIN VSCode.
  Everything is working fine if I'm running the application from the Terminal outside of VSCode.</li>
  </ul>
  <p>I'm running VSCode on macOS Big Sur Version 11.1 (M1 chipset).
  I have python 3.8.2 and TensorFlow installed in a virtual environment.</p>
  <p>Here's the steps to reproduce the Error. From the <strong>Terminal outside of VSCode</strong> I run</p>
  <ol>
  <li><p><code>source env/bin/activate</code> to activate the virtual environment</p>
  </li>
  <li><p><code>python</code> to launch python. Output to the terminal (as expected): Python 3.8.2 (default, Nov  4 2020, 21:23:28) [...]</p>
  </li>
  <li><p><code>import tensorflow as tf</code></p>
  </li>
  <li><p><code>print(tf.__version__)</code> This prints &quot;2.4.0-rc0&quot; to the terminal (as expected).</p>
  </li>
  </ol>
  <p>Now, if I repeat the exact same steps 1 and 2 in the built in VSCode terminal, I get the exact same output in 2. However, if I run command 3 and try to import tensorflow, the following error message shows up:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py&quot;, line 64, in &lt;module&gt;
      from tensorflow.python._pywrap_tensorflow_internal import *
  ImportError: dlopen(/Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 6): no suitable image found.  Did find:
          /Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: mach-o, but wrong architecture
          /Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: mach-o, but wrong architecture
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
    File &quot;/Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/__init__.py&quot;, line 41, in &lt;module&gt;
      from tensorflow.python.tools import module_util as _module_util
    File &quot;/Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/python/__init__.py&quot;, line 39, in &lt;module&gt;
      from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
    File &quot;/Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py&quot;, line 83, in &lt;module&gt;
      raise ImportError(msg)
  ImportError: Traceback (most recent call last):
    File &quot;/Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py&quot;, line 64, in &lt;module&gt;
      from tensorflow.python._pywrap_tensorflow_internal import *
  ImportError: dlopen(/Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 6): no suitable image found.  Did find:
          /Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: mach-o, but wrong architecture
          /Volumes/SSD/Jan/Documents/Github/TradingBot/env/lib/python3.8/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: mach-o, but wrong architecture
  
  
  Failed to load the native TensorFlow runtime.
  
  See https://www.tensorflow.org/install/errors
  
  for some common reasons and solutions.  Include the entire stack trace
  above this error message when asking for help.
  </code></pre>
  <p>It seems like the Terminal within VSCode is not using the same site-packages as the Terminal outside of VSCode, however, running <code>print(sys.path)</code> gives the same result.</p>
  <p>The same problem happens if I'm trying to run my application within VSCode whereas it is working if I'm running it from the Terminal.</p>
  <p>Any advice is greatly appreciated.</p>