user4491289
user4491289

Reputation:

unable to run python programs from windows 10 cmd

This is the path where python is installed on my computer A:\software installation\python and the same path has been added to the system path in Environment variables. My scripts are stored in A:\python programs but when I try to execute from the Windows command prompt (cmd) there is no output as shown below.

enter image description here

Upvotes: 3

Views: 37960

Answers (3)

aditi pandey
aditi pandey

Reputation: 151

If you have installed Python 3.7 or above try using keyword "py" instead of "python" on cmd. It worked for me.(I have python 3.7 32bit installed in windows 10 operating system)

Upvotes: 14

Adarsh Kumar
Adarsh Kumar

Reputation: 11

I had a similar problem and solved it using the following steps:

  1. Right-click the file you want to run.
  2. Select "always run using this program" to make this default, to avoid doing this again for other running other python files.
  3. Browse and select the python 3.6 (or 2.7) interpreter file.

Upvotes: 1

curious
curious

Reputation: 176

Just set your environment variable path, like C:\Python27.

  1. Check your system for the installation path
  2. Copy the path
  3. Go to my computer properties => advance system setting
  4. In the Advanced tab => Environment variable => click on the path, then click on new and paste the path
  5. Click ok and restart the cmd

All done :)

Upvotes: 3

Related Questions