unable to import Django.shortcuts unable to import Django.shortcuts django django

unable to import Django.shortcuts


If you look in your status bar you will notice you selected your global install of Python 3.7.4 and not a virtual environment. If you click on that you can then choose your virtual environment that you installed Django into.


enter image description here

You selected your global install of Python 3.7.4 and not a virtual environment. If you click on that you can then choose your virtual environment that you installed Django into.

enter image description here


Screenshot

Solution 2: (open VS Code from an activated virtual environment):

  1. Open the terminal window
  2. Activate the relevant python virtual environment
  3. Ensure Pylint is installed within this virtual environment pipinstall pylint
  4. Close all instances of VS Code
  5. Launch VS Code from within this terminal window

(this will ensure the VS Code process will inherit all of the Virtual Env environment settings)