Python run issue

Hello, if I install python by downloading it from the site I can’t start it from the prompt. If instead I download it from the microsoft store I have no problems starting it but the Script folder is not created. I hope someone can help me

Exactly how did you “download it from the site”? Exactly how did you try to “start it from the prompt”, step by step? Exactly what happens when you try this?

Do you understand that the Windows installers offered on are installers? You need to install Python before you can use it.

What do you mean by “the Script folder”? Where do you think this folder should be created; what do you think should be in it; and why do you think these things should be the case?

Initially I downloaded python 3.11 from Download Python | and I installed on C but when I tried to run it tipyng “python” in the cmd prompt the microsoft store were opened so the system didn’t execute python, probably because it didn’t find python (even if I added it in the path).

So I uninstalled it and I downloaded and installed python 3.11 from the microsoft store
After the installation I saw that in the python directory there wasn’t the “Script” folder, that I saw instead in the python directory when I installed python that I downloaded from the website(for this I expected the Script dir).

I hope it’s clearer

Yeah so Microsoft does do this weird thing where they let you type “python” but it opens the Store.

Personally I avoid the Store version and use the one from the Python website instead (the one you tried first). Store apps have some restrictions that the website version doesn’t.

On Windows, I’ve found the easiest thing is when running the installer from the website, make sure to check the option for the “py launcher”. This adds an extra executable called “py” that launches Python (and can handle having more than one version on the system I think?) So in cmd or PowerShell you type “py” instead of “python” and it will run the Python shell like you’d expect. It helps a lot in exactly this case.

It works! Thanks a lot

The installer does not add it to the path by default. If you do add it, there is no reason for the store app to open.

There are reasons for this, and the interaction with the store app is a result of multiple things going wrong between the PSF and Microsoft. For more detail:

After installing Python, nothing inside that directory is designed for user service. The Scripts directory inside that folder is not a good place to put your Python code. Code that you write does not need to be in a specific place in order to be usable; but the Python directory is better left untouched, in the same way as the Windows directory. You should put it somewhere that you can easily access. My personal preference is to make one main “dev” folder on the desktop, then put a folder per project inside that.

> py -x.y loads <Pythonxy directory>\python.exe. is wherever one indicated to load python when installing (or whichever default) one chose. py loads whichever version one last specified as the current version when installing, or perhaps the latest pythonx.?. I currently have the latest bugfix release of 5 versions, so I think the ‘py’ abbreviation is great. I only use python, in a source repository directory, to load locally built binaries. This is usually the current version of branch ‘main’.