[Solved] python is not recognized as an internal or external command
The most asked question I have ever encountered in my Python Training career from students is: "How do I solve for python is not recognized as an internal or external command..." error?
If the following error screen sounds familiar, you are not alone:
Well, this is not a python specific issue but something related to the Path Variable.
What do I need to do to fix this issue?
If you quickly want to fix this issue, you need to follow the steps below to add python to your path variable.
Follow the steps below:
Step 1: Right-click on your search icon beside the windows icon and type "Environment Variables"
Step 2: A System Properties window will open. Click on Environment Variables
Step 3: Select Path and click on "Edit"
Step 4: Click "New" and add the <location of python installation> and <Python location>/Scripts one by one.
Windows will now add the Python installation and <python installation>/scripts to the path.
(My python is installed at "C:\Users\iitia\AppData\Local\Programs\Python\Python38-32" so I pasted the following paths one by one after clicking new as shown below!)
Step 5: Well, this step is crucial as it is easy for beginners to skip this one. Make sure (I repeat, make sure) you restart your terminal.
Now try to type python in the terminal, and you should see a screen similar to the one below:
and you are done!
The error is gone. Happy Coding!
Comments
Post a Comment