python is not recognized as an internal or external command

0 votes

So I have recently installed Python Version 2.7.5 and I have made a little loop thing with it but the problem is, when I go to cmd and type python testloop.py I get the error:

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

I have tried setting the path but no avail.

Here is my path:

C:\Program Files\Python27

As you can see, this is where my Python is installed. I don't know what else to do. Can someone help?

Aug 24, 2018 in Python by bug_seeker
• 15,510 points
2,527 views

3 answers to this question.

0 votes

I have met same issue when I install Python, and it is resolved when I set a PATH in system, here are the steps.

  • Navigate to "Control Panel" -> "System"

  • Click "Advanced system settings" on the left

  • Click "Environment Variables"

  • Search and click "Path" variable

  • Click "Edit"

  • Add "C:\"to the environment variables field, if you are using Windows7, then separate it by a semicolon from the existing entry. If you are using Windows10, just simply click "New" to add.

  • Reopen the Command Prompt and try enter image description here

answered Aug 24, 2018 by Priyaj
• 58,020 points
0 votes

Try "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 8, 2022 by Rahul
• 9,680 points
0 votes

Try "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 8, 2022 by Rahul
• 9,680 points

Related Questions In Python

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,877 views
0 votes
1 answer

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

Use "py" instead of "python" from command ...READ MORE

answered Feb 16, 2022 in Python by CoolCoder
• 4,420 points
1,114 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
711 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
660 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,434 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,070 views
0 votes
1 answer

Python `if x is not None` or `if not x is None`?

There's no performance difference, as they compile ...READ MORE

answered Sep 3, 2018 in Python by Priyaj
• 58,020 points
2,652 views
0 votes
2 answers

Check a number is Prime or not in Python

There is an efficient way to write ...READ MORE

answered Oct 26, 2018 in Python by Priyaj
• 58,020 points
5,094 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