Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to run my python code with python myscrapy.py but I am facing following error ‘python’ is not recognized as an internal or external command in Python. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
How ‘python’ is not recognized as an internal or external command Error Occurs?
I am trying to run my python code with python myscrapy.py but I am facing following error.
'python' is not recognized as an internal or external command
How To Solve ‘python’ is not recognized as an internal or external command Error ?
How To Solve ‘python’ is not recognized as an internal or external command Error ?
To Solve ‘python’ is not recognized as an internal or external command Error You must have to add python path In your PATH variable. Without adding path you cannot use python. Just follow this step to add python in PATH variable. First of all click start ButtonThen Search Environment VariableThen Select Environment Variables.. at the bottomNow in System variables Search PATH and Edit itThen Click on New button and Paste your Python installation Path There.You have to add python install directory, bin, and lib-scripts in path.Now, Your error must be solved.
‘python’ is not recognized as an internal or external command
To Solve ‘python’ is not recognized as an internal or external command Error Just Try py instead of python from command line something like this: py myscrapy.py Now, your error must be solved.
Solution 1: try py instead of Python
Just Try py instead of python from command line something like this.
py myscrapy.py
Now, your error must be solved.
Solution 2: add python to environment variable
You must have to add python path In your PATH variable. Without adding path you cannot use python. Just follow this step to add python in PATH variable.
- First of all click start Button
- Then Search Environment Variable
- Then Select Environment Variables.. at the bottom
- Now in System variables Search PATH and Edit it
- Then Click on New button and Paste your Python installation Path There.
- You have to add python install directory, bin, and lib-scripts in path.
- Now, Your error must be solved.
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read