0

I'm not using a virtual environment, & have tried selecting the appropriate python interpreter.

When I do a python3 -m pip install flask,

my terminal says Requirement already satisfied: MarkupSafe>=0.23 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from Jinja2>=2.10.1->flask) (1.1.1)

However, I receive this error message: ModuleNotFoundError: No module named 'flask' which traces back to VSCode being unable to import "flask" for some reason.

Image of error message from PyLint

Would appreciate any help!

AnsonH
  • 2,460
  • 2
  • 15
  • 29
  • Is Python 3.8 on PATH and the one that VSC is using? – monsieuralfonse64 Jan 06 '21 at 18:21
  • @monsieuralfonse64 python 3.8 is on PATH & is the one VSC is using, but i realised that the flask package is installed under python 3.8 even though my machine/vscode is using python 3.7 this is what it shows me: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages – codinggirl123 Jan 06 '21 at 18:49
  • but my python 3.7 is stored in /usr/local/bin/python -- for some reason python 3.7 doesn't show up in the "Versions" folder above. do you have any advice abt reconciliating the 2? thanks (-: – codinggirl123 Jan 06 '21 at 18:51
  • Clarify which version of python you're using in VSC – monsieuralfonse64 Jan 06 '21 at 19:28
  • @monsieuralfonse64 3.7 & it follows the same path of where 3.7 python is stored in my computer – codinggirl123 Jan 07 '21 at 03:06
  • @codinggirl123 vscode lets you pick any version of python on your PATH. On the very bottom of the vscode window you'll see something like "Python 3.8.5 64-bit" if you click on it you can select a different interpreter. – Jared Smith Jan 07 '21 at 03:24

0 Answers0