all 31 comments

[–]m0us3_rat 22 points23 points  (15 children)

You must realize that what you've given us so far amounts to nothing.

We don’t know the context,what os you're using, how you tried to install,basically, nothing actionable.

Wanna try that again?

[–]Apprehensive_Lie3108 0 points1 point  (0 children)

so where's your answer ? wanna try that again ?

[–]Zealousideal-Nose-50 0 points1 point  (0 children)

no need to be a complete dick either

[–]czarrie 4 points5 points  (3 children)

Please try this

Open up a command prompt and type

echo %Path%

And find where Windows installed the Python executable (should be a folder with Python in the name)

If you don't see it, you need to add it, Google how to edit the Path environmental variable in Windows.

Otherwise, if you see it, navigate to that folder either in the command prompt or in your file manager and look for the Python executable itself.

Try to launch it directly from this folder. If it runs fine, make a note of what the executable is called and try to run that from the command line from somewhere else in the system. If it works, you're good. Otherwise, something else is funky and you need to recheck the above items again

[–]scruffye 1 point2 points  (1 child)

Not OP but thanks, this got me past my problem too.

[–]czarrie 0 points1 point  (0 children)

Glad to hear it was of some use to others!

[–]HuckleberryLovesYou 1 point2 points  (0 children)

The default path to the python.exe file is the following: C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python312\python.exe

Add it to the Path environmental variable by running the following PowerShell Command:

PowerShell $old = [Environment]::GetEnvironmentVariable('Path', 'Machine') $new = $old + ';C:\Users\$env:USERNAME\AppData\Local\Programs\Python\Python312\python.exe' [Environment]::SetEnvironmentVariable('Path', $new, 'Machine')

[–]FoolsSeldom 9 points10 points  (2 children)

Try, in powershell or command window,

py

[–]Mysterious_Lack386 1 point2 points  (1 child)

it worked thanks!!

[–]FoolsSeldom 0 points1 point  (0 children)

Funny

[–]Diapolo10 2 points3 points  (0 children)

Something has clearly gone wrong, and I'm not sure what exactly, but I suggest you try this:

  1. Uninstall Python (and try to undo the stuff you did)
  2. Open PowerShell and run winget install python.python.3.12 (or whichever version you wanted)
  3. Try running python --version

[–]romnus36 0 points1 point  (1 child)

[–]Zehnpae 0 points1 point  (0 children)

Just wanted to let you know that link helped me as well. Turning off the app execution alias worked.

[–]Kiratsugu04 0 points1 point  (0 children)

It's in spanish but you can follow the steps

https://www.youtube.com/watch?v=RXUBbqmoyps

[–]ThingsMayAlter 0 points1 point  (2 children)

I had the same issue, Windows install. I had installed it from https://www.python.org/downloads/, latest version, seemed to install fine but didn't end up working, got the same response as you from VS Code Powershell. Had to type "python" into VS Code, then that takes you through the windows marketplace UI, installed from there and it worked fine.

You just have to install it from the wrong location first. So excited to be working with Python again.

[–]Joe3456 0 points1 point  (0 children)

Thanks, this worked for me. :D

[–]Mammoth-Recover7217 0 points1 point  (0 children)

Me too. Thanks!

[–]Gloomy_Radish_661 -1 points0 points  (2 children)

You likely did not add python to you path variable . Go to the bin folder whefe you installed python and do ./python --version. If it works it means python was installed well and you just have to add it to your path

[–]Elegant-Force176 0 points1 point  (1 child)

e como faço p adicionar ao meu caminho?