python is not recognized as an internal or external command

0 votes
I recently got Python Version 2.7.5 and created a small loop using it, but when I go to cmd and run python testloop.py, I get the following error:

the command 'python' is not recognised as an Internal or external command.

I tried setting the path, but it didn't work.

Here's the path

C:\Program Files\Python27

Python27

This is where my Python is installed, as you can see. I'm at a loss on what to do. Is there anyone who can assist me?
Feb 16, 2022 in Python by surbhi
• 3,820 points
1,127 views

1 answer to this question.

0 votes

Use "py" instead of "python" from command line:

C:\Users\Cpsa>py
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

answered Feb 16, 2022 by CoolCoder
• 4,420 points

Related Questions In Python

0 votes
3 answers

'python' is not recognized as an internal or external command

Try "py" instead of "python" from command line: C:\Users\Cpsa>py Python 3.4.1 (v3.4.1:c0e311e010fc, May ...READ MORE

answered Feb 8, 2022 in Python by Rahul
• 9,680 points
2,549 views
0 votes
1 answer

'python' is not recognized as an internal or external command

There are multiple ways you can use: 1)Use ...READ MORE

answered Feb 16, 2022 in Python by Nandini
• 5,480 points
16,934 views
0 votes
0 answers

'python' is not recognized as an internal or external command

So I have recently installed Python Version ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,620 points
723 views
0 votes
0 answers

'python' is not recognized as an internal or external command [duplicate]

I recently got Python Version 2.7.5, and ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
694 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,464 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,123 views
0 votes
1 answer

What is the python keyword "with" used for?

It's useful when you have two or ...READ MORE

answered Feb 9, 2022 in Python by CoolCoder
• 4,420 points
710 views
0 votes
1 answer

When to use "while" or "for" in Python

Yes, there is a significant distinction between ...READ MORE

answered Feb 9, 2022 in Python by CoolCoder
• 4,420 points
517 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP