VS code anaconda config

I tried to import numpy but got a no module named numpy this error only appears to occur in VS code, because I tried import numpy on spyder and spyder did not return any error, so that led me to believe my configuration for my python interpreter was was wrong.

things I’ve tried:

  • uninstalling and reinstalling anaconda
  • checking if numpy and matplotlib was installed on my computer already, which it was
  • uninstalling and reinstalling numpy and matplotlib just in case.
  • My anaconda3 is located in /Users/MacBook/opt/anaconda3/bin/python .
  • Path in my .bash_profile : export PATH="/Users/MacBook/opt/anaconda3/bin:$PATH"
  • The current python interpreter on VS code is Python 3.8.8 (base: conda) . my python version is 3.8.2 and numpy is version 1.20.1 py38hd6e1bb9_0