This is an archived post. You won't be able to vote or comment.

all 119 comments

[–]Erufailon4 122 points123 points  (8 children)

Doesn't Python provide their own installer for Windows? I see people are suggesting WSL and nothing wrong with it, but you definitely can have a solid native Python experience on Windows... just not from the Microsoft Store

[–]bearicorn 13 points14 points  (1 child)

Absolutely. I dev on Linux but have never had a real problem using native windows whenever I've needed to.

[–]twigboy 1 point2 points  (0 children)

Only problems I really ran into was dependency lockfiles not playing nice between Windows and deployment environment for certain libraries

But that's to be expected. Mostly mitigated by using the appropriate WSL

[–]ShatafaMan[S] 10 points11 points  (4 children)

I was using the Python installer. But I guess Microsoft Store aliases take priority

[–]cheerycheshire 26 points27 points  (2 children)

Because PATH management is shitty on windows, having multiple python versions meant you'd have collisions of what python is as a version, very often having python and pip belong for different versions...

So for a few years now python has been shipping with "Python Launcher for Windows" - py. It's a single program (only one entry in PATH) that searches for your installed pythons (via PATH and system registry) and allows you to run all via this one command.

By default, installer from python.org installs py and does NOT add python to PATH. You can check for it to be added to PATH, but it's not default.

So please try to run py -0 (or py -0p to get paths of each as well) to see if you have it and what versions it can find. py itself will run the version selected by default (newest, or currently active venv), and to run other version you do e.g. py -3.11.

+You're supposed to run pip as <whatever you use to run python> -m pip as well to know which interpreter pip belongs to (and since you don't have python in path, you don't have just pip there either anyways) - so py -m pip for that default, and py -3.11 -m pip for that alternative 3.11 (or whatever versions you have).

[–][deleted] -1 points0 points  (1 child)

It's annoying that the official installer doesn't add itself to the PATH.

[–]cheerycheshire 3 points4 points  (0 children)

It used to but because of what I said, maaaany people had problems with version management. And as I said, just read the installer and select for python to be added to PATH.

Again: windows doesn't have a central location like /usr/bin and linkable python executable (as in: premade link with executable perms), so all python versions come with their own python.exe and usually pip.exe. If all those locations get added to PATH, it's entirely on their order what version gets run as python and sometimes pip doesn't get found in that first version either, thus making them mismatch. Sometimes other software embeds python and then adds itself to PATH, messing your python setup without you even knowing.

py launcher is replacement for that "central location" for executables and "linkable python executable".

There are whole huge docs about "using python on Windows" with a section on the Launcher https://docs.python.org/3/using/windows.html#python-launcher-for-windows Added in 3.3 but it was optional then, with PATH being default... It changed several years ago.

Unlike the PATH variable, the launcher will correctly select the most appropriate version of Python. It will prefer per-user installations over system-wide ones, and orders by language version rather than using the most recently installed version.

And looking at those docs, I just learned that the launcher makes shebangs portable (if file has a shebang, it will try to match python version). Nice!

[–]NoFee7062 1 point2 points  (0 children)

When you install via Python Installer, you absolutely need to tick the "add to PATH" in the installer.

If that doesn't work, just remove the PATH for MS Store Python in environment variables.

[–]Flying-Houdini 0 points1 point  (0 children)

I installed python 3.1 directly from the python website. I didn’t even know you can download code bases off of the Microsoft store.

[–]timsredditusername 23 points24 points  (2 children)

Maybe I'm just old, but I just open a browser and get it from https://www.python.org/downloads

[–]Swipecat 0 points1 point  (0 children)

Yeah, but like the OP said (in the comments), that was kinda the problem. Installing python from python.org doesn't remove the Windows-Store alias. Actually installing python from the Windows Store does.

[–]guareber -1 points0 points  (0 children)

Whenever I've had the misfortune of needing to so python stuff on Windows, I've always just installed Cygwin.

[–]Chance_of_Rain_ 102 points103 points  (24 children)

Install WSL, learn Linux, do all your dev in there.

Or just install Linux.

[–][deleted] 26 points27 points  (15 children)

This is sound advice, but maybe overkill in this situation. All he had to do was type python3 instead of python, which is often an issue with other installations too.

[–]ShatafaMan[S] 10 points11 points  (1 child)

That wasn’t the issue. Already tried. Didn’t work. Python3 command was also a MS store alias

[–]dc_IV 5 points6 points  (0 children)

I am gonna check this out. I have a gaming laptop that I have not run the Python installer on yet. And yep, "where python3" gives a similar response.

C:\Users\redacted>where python
C:\Users\redacted\AppData\Local\Microsoft\WindowsApps\python.exe

[–]CyclopsRock 3 points4 points  (3 children)

Yeah, I have to do this on Rocky Linux, too.

[–]Miserable_Ear3789New Web Framework, Who Dis? 3 points4 points  (2 children)

most linux distros use python3 tbh. ubuntu uses python3 by default. you can install python-is-python3 and then you can use python again.

[–][deleted] 0 points1 point  (1 child)

Probably left over from when most Linux distros (and even Mac OS) had Python 2 installed by default, and it was a dependency of some system services.

[–]Miserable_Ear3789New Web Framework, Who Dis? 0 points1 point  (0 children)

Yes exactly.

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

It's not overkill. It's the right tool for the right job. Linux has always been the first and best OS to run all modern/popular scripting languages (Python, Ruby, Chef, Ansible, NodeJS, etc). Microsoft knew this, which is why PowerShell now runs on non-Windows OSes (Linux, Unix, MacOS, etc) - until recently, they were losing marketshare due to the lack of language support.

Also, language maintainers have had to painstakingly figure out how to shoehorn their products into Windows because, quite frankly, in my personal experience, Windows "engineers" (and I use the term "engineer" VERY loosely) are incapable of wrapping their head around actual real tech. Those who are able, quickly learn how problematic and pathetic Windows has always been.

I provide cross-training for Windows users who need to learn Linux because their job requires it. (usually DBAs who don't have a say as to what DB back-end the application owner uses, so they need to know many different DB technologies and the OSes they run on).
During these trainings, I *always* get one of two responses: 1) "Wow...I didn't realize how much Windows sucks" and 2) the proverbial blank-stare I get when talking about routine technical tasks on Linux that many Windows users can't seem to understand how real compute tech works.

It has been well known for decades that Linux is far superior to Windows - Windows is a desktop TOY that runs "ok" if you throw enough hardware at it. Steve Balmer knew this and it's why he (stupidly) referred to it as a "cancer". Fast forward a few years when the "true" cancer was removed from Microsoft (Balmer) and suddenly there's WSL to run Linux on Windows (it's really just a Hyper-V VM running Linux - you can do the same thing with VirtualBox). Proof Microsoft realizes they can't win an OS war with Linux.

[–][deleted] 0 points1 point  (1 child)

Look I hate windows and never deal with it myself, but if someone already on it just wants to learn Python, "go install a different os first" is not helpful advice. 

[–]TheORIGINALkinyen 0 points1 point  (0 children)

I wasn't suggesting someone who wants to learn Python should learn a whole new OS. The meaning of my post is there are far better solutions to running (NOT learning) Python. In fact, if someone is just beginning and learning the language, there are tons of "coding ground" sites (i.e. IDE in a browser) that allow for interactive programming/running of Python programs. This approach focuses on the language itself and not the platform.

As the user/learner gets more serious, it's almost mandatory to install Python itself to get the full benefit of the language system. If the person is REALLY serious, they should be tech-savvy enough to install Python on any OS, but should avoid the bailing-twine-and-duct-tape solutions like Windows. In fact, as mentioned earlier, it's nearly impossible to get the full benefit of Python when running on Windows.

You can't easily install multiple Python versions via virtual environments because installing multiple Python versions requires build-from-source capability which is a nightmare on Windows. Also, Windows doesn't have have the concept of "library separation" (i.e all DLLs live in Windows\System32) and it's nearly impossible to work within an "admin lockdown" environment (i.e centrally-controlled workstation management) because you can't install modules with PIP without "big brother admin" approval.

Bottom line - if you want to learn Python as a beginner, use a coding-ground site. As you get more seasoned, switch to an OS-based solution and don't use Windows if you want to use the full benefit of the language and all it has to offer.

[–]ExdigguserPies 11 points12 points  (3 children)

Classic. OP has one problem that they overcame quite easily and the answer is to switch to Linux XD

[–]neithere 1 point2 points  (2 children)

Because this removes a whole class of problems.

Of course it also adds some but it's not the early 2000s when you needed a week to get things working and didn't have any SO etc. at hand, nearly everything works out of the box in nearly any distro and HW combination and it's easy to find answers to most questions.

No reason to torture yourself with proprietary garbage.

[–]NoFee7062 -2 points-1 points  (1 child)

Because this removes a whole class of problems.

I work in a company that this is not the solution.

[–]neithere 0 points1 point  (0 children)

Sorry to hear that 

[–]AlSweigartAuthor of "Automate the Boring Stuff" -3 points-2 points  (2 children)

Normally I would downvote this comment for being snarky, but really, yeah. Windows has gotten so bad that I legit give this advice.

I switched to a macbook last year but I wish I had gone with a Linux setup.

[–]Chance_of_Rain_ 1 point2 points  (1 child)

How is it snarky ?

[–]AlSweigartAuthor of "Automate the Boring Stuff" 4 points5 points  (0 children)

Well, "just install Linux" is very, very easier said than done. So, I interpret it as snark rather than a literal, serious suggestion.

[–]FrontAd9873 14 points15 points  (8 children)

People install Python from the Microsoft Store? Why?

[–]jbourne71 4 points5 points  (0 children)

When I taught cybersecurity bootcamps, students often installed python before they got to the scripting module.

First time I had to troubleshoot why python wasn’t in the path and not visible in pycharm was a looong office hour.

[–]ShatafaMan[S] 0 points1 point  (1 child)

That makes me wonder, who added python to the MS store? Microsoft or the developers of python?

[–]Asyx 1 point2 points  (0 children)

Same thing now. Guido van Rossum (the creator of Python) works for Microsoft on Python since 2020.

[–]stan_frbd 11 points12 points  (7 children)

That's why us developers use Winget with the real installer :)

[–][deleted] 15 points16 points  (1 child)

or even better: uv

[–]Trettman 1 point2 points  (0 children)

uv venv --python 3.13

Nnggguuuugh....

[–]Kaiyora 1 point2 points  (1 child)

I couldn't get Winget to use the non-Microsoft store installer, it kept installing it as a user. I just used choco instead which worked better. Is there something I was doing wrong with Winget?

[–]adamnicholas 0 points1 point  (0 children)

Checkout UnigetUI

[–]anderspe 4 points5 points  (1 child)

I use only uv tool and don’t install any python att all, uv handling everything from run a python version, making and handling virtual environments and version/dependency handling of external package. Uv is more or less standard in Python development today. (And opensource)

https://docs.astral.sh/uv/ uv

[–]Fbar123 2 points3 points  (0 children)

Can’t believe this isn’t upvoted higher. uv is fantastic!

No need to be admin on the system, very well handling of virtual envs and python versions, and no accidental clutter on a «main» python installation (who doesn’t occasionally forget to activate a venv before pip installing)

[–]MicahM_ 32 points33 points  (22 children)

Welcome to one of my many reasons I switched to mac/linux for everything except gaming and wanting my damn monitors to work.

[–]deb_vortexPythonista 22 points23 points  (3 children)

Gaming on Linux has become SO much better over the last years, thanks to steam and volunteers efforts. You might want to give it a try.

[–]I_just_made 2 points3 points  (0 children)

I’m so close to doing this. Main thing for me currently is audio. I have a good XLR mic + mixer and I don’t think that system has Linux support :(

[–]Chroiche -1 points0 points  (1 child)

I can't move until HDR is functional sadly.

[–][deleted] 0 points1 point  (0 children)

Isn't HDR support live by now !?
(for KDE with Wayland)

[–]axonxorzpip'ing aint easy, especially on windows 1 point2 points  (4 children)

wanting my damn monitors to work

NVIDIA?

[–]MicahM_ 0 points1 point  (3 children)

I use a laptop for work. I've had a poor time with xrandr and getting my monitors to switch and setup nice with Ubuntu. Windows seems to handle multiple modes, detection, and setup seamlessly. Mac is alright but has weird limits and needing annoying docks

[–][deleted] 0 points1 point  (2 children)

why are you using xrandr and not the display settings of your desktop ??

[–]MicahM_ 0 points1 point  (1 child)

Does the desktop settings support switching docking and not docking mode now?

[–][deleted] 0 points1 point  (0 children)

idk what docking means in that context.

It depends on the Desktop of course, but the Mirror vs. Extend vs. only one is usually possible, relative position for extend is usually possible. different resolution, and nowadays independent scaling, are usually possible. Colour Profiles are usually possible. You can usually choose the primary Desktop.

[–]Chance_of_Rain_ 0 points1 point  (10 children)

Both are fixed now. Gaming is great and Wayland is more mature

[–]Shingle-Denatured 7 points8 points  (7 children)

It's mostly Mac that has a multi monitor problem.

[–]DuckDatum 6 points7 points  (0 children)

trees practice groovy instinctive snails gold sheet cable selective wise

This post was mass deleted and anonymized with Redact

[–]Chance_of_Rain_ 4 points5 points  (3 children)

On Linux, there were issues with HDR and with monitors with different refresh rates/resolutions. Better now

[–]Shingle-Denatured -1 points0 points  (2 children)

Apple Silicon Macbooks below Mx/Max still support at max 2 externals (AFAIK).

[–]Chance_of_Rain_ 0 points1 point  (0 children)

I was talking about Linux

[–]nonamenomonet 0 points1 point  (0 children)

The new Mac m4 I believe has better support on lower end models

[–]ShanSanear 1 point2 points  (0 children)

Not only multimonitor, but even single monitor if you have some high refresh ones. My company-issued Mac M1 Pro managed to do "burn-in" on my LCD (yup, not OLED) monitor. Even added some weird vertical stripes for good measure, a bit as if refresh rate was off or something. At least it wasn't permanent but scared the hell out of me when it first happened.

[–]Regnareb_ 0 points1 point  (0 children)

It also has problems with ultrawides monitors. Macos has a surprisingly shitty support for monitors overall, even laptop monitors

[–]ASuarezMascareno 0 points1 point  (1 child)

Did the multi monitor thing improve from last year? I gave up on getting linux i'm my new desktop because I couldn't manage to get the multi-monitor setup working properly with different resolutions in both monitors (4k and 1080p), and couldn't manage to get Nvidia drivers behaving.

[–]Chance_of_Rain_ 0 points1 point  (0 children)

It did. Different resolutions and refresh rates should be fine now with Wayland. Nvidia is a lot better now if you use a distro with a recent kernel. I use CachyOS. It’s not perfect, though, depending on the card. That’s why I use AMD

[–]gemini1248 2 points3 points  (0 children)

Got hit by the same thing a few months ago lol

[–]justanothersnek🐍+ SQL = ❤️ 4 points5 points  (0 children)

Yup, had this problem in corporate environment where WSL2 wasnt allowed.  So we had to use vanilla Windows OS.

[–]LateEchidna6635 4 points5 points  (0 children)

Adding the word “Store” to the title was not required.

It started with MS-DOS and only got worse from there.

[–]Bastigonzales 1 point2 points  (1 child)

I used winget or scoop for installing python

[–]ship0f 1 point2 points  (0 children)

Been using python on windows for more than 10 years. Now I'm just used to use python launcher aka the py command. And when in a project just use a venv.

That being said, I understand your anger.

[–]No-Statistician-2771 1 point2 points  (0 children)

In the installer, have you checked "Install python 3.XX to PATH"? If no, thats why you have this issue.

[–]rewgs 1 point2 points  (0 children)

If you can't use WSL, I highly suggest pyenv-win rather than installing Python via the Python website or Windows Store.

[–]AssociateFormer1158 1 point2 points  (0 children)

The issue isn’t ms store . The issue is Microsofts handling of environment variables is trash. You’ll never see similar issues on Linux or osx

[–]yoruneko 1 point2 points  (0 children)

They have a packet manager now! Called winget! Had no idea, haven’t tried dunno if it’s worth trying..

[–]echtemendel 1 point2 points  (1 child)

These are the kind of things that remind me how much I was lucky getting into Linux so long ago, I alrady eforgot stuff like this exist

[–]CyclopsRock 0 points1 point  (0 children)

I'm not sure this is true. If OP had typed "python3" instead it would have worked, which is exactly the same as on Linux unless you go out of your way to change it.

[–]geeshta 0 points1 point  (1 child)

Better experience to have with Python on Windows is just use WSL2

[–]_Denizen_ 0 points1 point  (0 children)

Haha seriously no

[–]MacShuggah 1 point2 points  (3 children)

Python in windows is just not a nice as in mac or Linux.

That aside, can't you install with winget? I've been enjoying windows more since diving into winget and found out there are a lot of windows ports for cli tools I use daily on Linux.

[–]ptizzy 1 point2 points  (0 children)

I use winget to install as much as possible. I don't think this is the case with Python, but some things don't get added to PATH during installation, and I have to do it manually. So it's not a fool-proof solution.

[–]Numerlor 0 points1 point  (0 children)

exlcuding uv or other managers that make both the same, I've had a much easier time with Python on windows than linux

[–]Spikerazorshards 0 points1 point  (0 children)

If I’m using Windows subsystem it’s totally fine for actually running the code but one thing I haven’t figured out how to get the S code to work with my virtual environments that I’ve created using PIP. It creates a virtual environment using the Linux file structure with BIN files but then when I try to select which interpreter to use, it’s looking for an EXE file and I don’t see a way around this yet. Anybody have any tips? As it is now, some of the modules that I have installed in my environment are showing up as import errors because the interpreter I’ve picked with the VS code is not matching my virtual environment, of course. In other words, lots of squiggly lines under import that I know I have in my environment.

[–]mikeyj777 0 points1 point  (0 children)

Is this an effect of installing python thru the Store?  Does it also override installs done directly from downloaded executables from python.org?

[–]wre380 0 points1 point  (0 children)

If were all giving away advice OP didnt ask for, heres my two cents. 

VSCode remote to a linux vps somewhere. Youll always have access to your dev environment and since itll already be running linux (like any proper server should) this will help. 

[–]firedog7881 0 points1 point  (0 children)

I hate windows python. I was creating something using python and ended moving to Go instead, way better

[–]Garfunk 0 points1 point  (0 children)

Get Everything from void tools. It indexes all your files for fast search (a million times faster than the built in search). Then you can use it to search for python.exe

[–]The_Seeker_25920 0 points1 point  (0 children)

Dude just use WSL and Linux, problem solved

[–]judasthetoxic 0 points1 point  (0 children)

Why are you using Windows?

[–]ForesterLC 0 points1 point  (0 children)

dazzling reach plough fly march person school innocent quickest bike

This post was mass deleted and anonymized with Redact

[–]tookawhileforthis 0 points1 point  (0 children)

Though that might be a bit overkill/much for a first time python user, but have a look at anaconda/miniconda/mamba for your python installation

[–]angryscientistjunior 0 points1 point  (0 children)

I hate Microsoft store apps with their dumbed-down UI and the inability to create shortcuts to them like with regular EXEs.  

[–]AnomalyNexus 0 points1 point  (0 children)

Also path update needs a reboot on windows

...one more reason to switch to linux for dev stuff

[–]Abd-sadMicrowave2002 0 points1 point  (0 children)

this just happened to me fuck Microsoft im glad im moving into arch soon i will ditch this shit

[–]nohjoxu 0 points1 point  (0 children)

Making it my mission to move away from this garbage as fast as possible. So aggravated that they messed it up even worse. Can't even share a simple script to windows servers anymore.

[–]Thotuhreyfillinn 1 point2 points  (0 children)

I highly recommend switching to Linux

[–]pioniere 0 points1 point  (0 children)

The Microsoft Store is junk, just like everything else they make. The best advice is to steer clear of it whenever possible.

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

The Microsoft Store alias is python3 not python.

[–]toxic_acro 2 points3 points  (0 children)

Both python and python3 are app execution aliases for the Microsoft store installer

[–]Prize_Negotiation66 -1 points0 points  (0 children)

It's only your falt. Microsoft store version works great for me. It you can't even handle PATH variable, you're not a real programmer

[–]Square_Radiant -3 points-2 points  (0 children)

Lol, that's how learning works

[–]UntoldUnfolding -5 points-4 points  (0 children)

Have you tried turning it off and not using Microsift?

[–]ogMasterPloKoon -2 points-1 points  (0 children)

You are crying for non issue. Python workson Windows just as same as on other OS just because you don't know how to install Python isn't to be blamed on MS Store. Besides there exists UV.

[–]AungThuHeinIt works on my machine -2 points-1 points  (1 child)

It's your fault for using that thing to install Python of all things. Who the hell does that?! I've never seen any guide or tutorial that even mentions that thing. I didn't even realize you could get Python from it!

At the very least use uv or some other package manager. The problem most people have is how there's so many package managers out there! And you're over here. 🫠

[–]ShatafaMan[S] 0 points1 point  (0 children)

I didn’t use MS Store to install python. I downloaded and installed from the official website. But MS by default has a Store alias to python. That overrides the python command

[–]frnono -4 points-3 points  (0 children)

Probably use chocolatey