Python command not found
In previous topic we have tried few bash commands, some times you may get “command not found error”. Here we will discuss how to troubleshoot this problem.
- This error may cause because you might have not selected ADD TO PATH option during installation
- To troubleshoot this issue you need to check the system variables path on your computer.
Follow the following steps
By clicking on Environment variables a new pop window will open. You need to check Path option. There must be a path variable for python as you can see in below screen.
If python’s path is not there then select the path option and click on edit button, a new screen will open and then click on new button.
Now go to c-drive>users>(your present pc name)>appData>Local>Programs>Python>Python37-32>Scripts
and copy the address as highlighted below.
Paste the copied address into the path option and save & apply. Do the same for system variable option also.
Note (By clicking on environment variables, Two options comes, one for “your username” and another is for “system variables”. This means that you are setting variables for your account name of your PC)
Now restart your pc and open vscode
- Press “cntrl+shift+p” and write In test box as “python: select interpreter.
- Now select your interpreter of python 32 bit or 64 bit as you have installed and reload vscode.
- By restarting vscode your problem will be fixed