delalma
delalma

Reputation: 928

Python not found on Windows

I have Python on my PATH but when I run the command prompt python --version I got:

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

Any help with Windows would be appreciated...

Upvotes: 3

Views: 21934

Answers (3)

Paul Jansen
Paul Jansen

Reputation: 1210

Windows has made it easier for non-professionals to install Python as of their 10 May 2019 update. See Who put Python in the Windows 10 May 2019 Update? for more details why this is done. As a result, you get this strange error when you try to run Python, even if you have installed it officially from the official Python download site.

The solution to this problem is perfectly described in this other StackOverflow question.

Upvotes: 1

piseynir
piseynir

Reputation: 225

I think your cmd prompt path and python path is not in same location.

First check the python location on your PC.

import os
import sys
os.path.dirname(sys.executable)

If it is on D: or another location you have 2 options, you can delete and re-install python to C: or you can open cmd prompt from D: or related python path.

Upvotes: -1

Joshua Johns
Joshua Johns

Reputation: 373

You need to download python from https://www.python.org/. During installation be sure to check the install to path option.

Upvotes: 3

Related Questions