I created 2 classes, one importing from another and giving error in import. I searched the internet and talked to go in the command palette and choose the interpreter (in my system it only has one: Python 3.6 (64bit) - Windows.) I clicked there, I rebooted VScode and it disappeared the import error warnings. no python file.I played the answer on the internet, including in English, but could not find a solution.
python.pythonPath ":" C: \ Users \ xxxxx \ AppData \ Local \ Programs \ Python \ Python36 \ python.exe "xxxxx = my windows username.
NOTE: Python scripts work perfectly at the command prompt.
Follow the image with the error, and also the text error soon after:
PSC:\python>test.py test.py:Theterm'test.py'isnotrecognizedasacmdletname,function,scriptfile,oroperableprogram.Checkthespellingofthenameor,ifa pathhasbeenincluded,seeifthepathiscorrectandtryagain. Intheline:1character:1 +test.py +~~~~~~~~ +CategoryInfo:ObjectNotFound:(test.py:String)[],CommandNotFoundException +FullyQualifiedErrorId:CommandNotFoundException
Suggestion[3,General]:Thetest.pycommandwasnotfound,but existsatthecurrentlocation.Bydefault,WindowsPowerShelldoesnotload thecurrentlocation.Ifyoutrustthiscommand,type: ". \ test.py". See "get-help about_Command_Precedence" for more details. PS C: \ python>