Search code examples
pythondjangovisual-studio-codevscode-python

Error: spawn ENOTDIR, when selecting python interpreter in VS Code


I have created django project and virtualenv into same folder as

enter image description here

opening-up vscode does not display the virtual environment in which the django project is using.

enter image description here

now if I select interpreter for the project I get

enter image description here


Solution

  • The problem was in the version of the python extension I was using(2020.1.57204). what I did was installed a slightly older version (2019.11.50794) of the python extension and reload vscode i.e.,

    Step 1: Click on Install Another Version

    enter image description here

    Step 2: Select the older version, here 2019.11.50794

    enter image description here

    Step 3: Click on Reload Required Button

    enter image description here

    UPDATE

    The Microsoft team fixed this error with the new release (2020.1.58038). Update the python extension to the new version to enjoy more enhancements and fixes.