Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

command 'python.execInTerminal-icon' not found

Recently I reinstall my VS Code due to some errors. But I am not able to compile python files. I have installed all necessary extensions like python and code runner. But still I am getting this:

enter image description here

like image 543
Tanishka Avatar asked Apr 29 '21 07:04

Tanishka


People also ask

How to fix Python command not found in shell script?

1 -bash: python: command not found. This error means Python is either not installed or your installation damaged. ... 2 Check for python path. ... 3 Verify Python installation. ... 4 A note about broken or missing symlink. ... 5 python not working in command/shell prompt. ...

Why is the Python command not found in-Bash?

-bash: python: command not found This error means Python is either not installed or your installation damaged. Here is how you can solve this problem. Check for python path

How do I check if Python is installed or not?

Windows: open a command prompt and run the following command: If the installation was successful, the output window should show the version of Python that you installed. Note You can use the py -0 command in the VS Code integrated terminal to view the versions of python installed on your machine.

Why is Python not installed on my computer?

This error means Python is either not installed or your installation damaged. Here is how you can solve this problem. It seems that Python is missing for an unknown reason or was not installed by my cloud provider to save the disk space. So install it as per your Linux distro or Unix variant:


4 Answers

Same problem occurred to me! All I did was just disabled and then re enabled the python extension again. OR Please uninstall the extension, restart VS Code, and then install it again. This error is symptomatic of an extension install going badly.

like image 79
Akhilesh Magdum Avatar answered Oct 24 '22 04:10

Akhilesh Magdum


I tried everything to fix this problem

1.Unistall VS Code.

2.Go to "C:/Users/{Whatever User}" and delete the .vscode Folder.

3.Go to "C:/Users/{Whatever User}/AppData/Roaming" and delete the "Code" Folder. This file stores all the VS Code Cache.

4.Restart you laptop and install VS Code again.

5.Install the python extension.

Yes they solve my other errors related to VS Code but this particular error was in my folder from which I was running my python program because when I execute some other python program saved in some other directory it worked successfully.

So I would suggest that you may try running your .py file by placing it in some new folder.

like image 44
Tanishka Avatar answered Oct 24 '22 03:10

Tanishka


I've just had exactly the same issue. My intellisense wouldn't work too. Tried everything.. at the end I've downgraded Jupyter version. Went back to version from 6 days ago and everything is working. Python, Pylance, Intellisense extensions are the newest.

like image 20
Jakub Avatar answered Oct 24 '22 04:10

Jakub


one of the solutions is you should downgrade python extension to lower extension. please click extensions icon then choose manage button below python extension.and click install another version. then choose older version.then select interpreter(ctrl+shift+p). at the end restart vscode and run python file.

enter image description here

Help Link How to Downgrade Extension

like image 2
Amin Golmahalle Avatar answered Oct 24 '22 02:10

Amin Golmahalle