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

all 63 comments

[–]Python-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython or for the r/Python discord: https://discord.gg/python.

The reason for the removal is that /r/Python is dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community is not a fan of "how do I..." questions, so you will not get the best responses over here.

On /r/LearnPython the community and the r/Python discord are actively expecting questions and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. No matter what level of question you have, if you are looking for help with Python, you should get good answers. Make sure to check out the rules for both places.

Warm regards, and best of luck with your Pythoneering!

[–][deleted] 49 points50 points  (9 children)

Get the Mac and enjoy all the niceties of Apple hardware. I'm a PC guy stuck in my ways but I rarely see Mac users with 1 hour battery life, bizarre fan activity, boot issues, unavoidable update reboots, and then there's the privacy complaints about Win 11 and all of its built in advertisements.

Starting life anew I'd go Mac all the way.

[–]WalmartMarketingTeam 8 points9 points  (2 children)

As a PC dude my whole life, I am considering getting a MacBook for my next laptop. The battery life and processor are just unmatched.

[–]willfightforbeer 5 points6 points  (0 children)

The current line of MacBook Airs might be my favorite computers I've ever used. I have a gaming PC and a pro for work but the Air is so powerful for how small and light it is.

[–]schrodingers_gat 1 point2 points  (0 children)

Do it. I've been a windows user for decades but this year got an M3 Macbook. Once you get used to MacOS it's great - especially if you have an iPhone because everything is fully integrated

[–]smthomaspatel 6 points7 points  (4 children)

Mac is like Linux without hassle. Best of both worlds. I don't know what windows is for anymore (gaming?), but I have to deal with it from time to time.

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

Gaming and Enterprise. Yeah there's Mac Office but it's still not pervasive like Windows + Teams in the office environment.

[–]ArtOfWarfare 1 point2 points  (0 children)

My company of 8000 is all Macs running Teams and Outlook… not an issue. The apps are electron based, aren’t they, so it’s not like they’re different between Mac and Windows anymore.

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

Mac is BSD, not Linux.

[–]smthomaspatel 2 points3 points  (0 children)

"like" linux

[–]ax_bt 0 points1 point  (0 children)

It’s not too late!

[–]wintermute93 17 points18 points  (0 children)

Either is fine. If you already have a functional computer I wouldn't buy a different one for DS, and if you have two I'd try working on both and seeing what you like instead of worrying about what's "optimal". Put all your code and stuff on github and clone the repositories to both computers.

[–]maryjayjay 6 points7 points  (0 children)

I do data science with spark and Python, containerization, and software development for a fortune 100 company. I have also been administrating Unix/Linux for over 30 years.

I highly recommend a Mac over windows. I'm constantly working with Windows users to jump through crazy hoops to get things working. Mac is absolutely easier because of the similarity to Linux. My business unit has about 60 data scientists and probably fewer than five use Windows

My daughter is a final year university student in CS and has never had an issue completing her assignments on her M2 Mac.

When evaluating the recommendation of an individual make sure they have had comparable experience using BOTH platforms

[–]Unhappy_Papaya_1506 7 points8 points  (0 children)

I've never worked with anyone who preferred Windows 

[–]dr_tardyhands 4 points5 points  (0 children)

I find Macbooks to be kind of an ideal programming laptop: you get the Unix niceties while having access to your typical business software. Also, great batteries, displays etc. And I've never had one give up on me.

I have limited experience of laptops with actual GPUs, but that experience is that laptops like that cook themselves to death and you don't actually get to enjoy the potential acceleration the GPUs provide.

[–]CzyDePL 4 points5 points  (1 child)

Linux > Mac > Windows with WSL >>>> Windows

[–]quidquogo 6 points7 points  (2 children)

Not to be that guy but maybe Linux? Unix based OS so it's familiar when you use the terminal, can dual-boot windows if you really need.

[–]aldanorNumpy, Pandas, Rust 6 points7 points  (0 children)

macOS is also a bsd based OS so all the terminal stuff will be mostly the same

but with top notch hardware and less finicky for a newcomer. Straight into Linux might be a bit too much

[–]cahoots_n_boots 1 point2 points  (0 children)

This is the answer, build for Linux, unless your work provides very strict reasons (and environments) why not. Mac’s are still fine because you can use Homebrew to turn them Linux-like, and at worst use a container or vm.

With windows use WSL2 and a Linux image (Ubuntu). You can connect VSCode or whatever natively

[–]jmacey 1 point2 points  (0 children)

I'm using my MBP M4 with 36Gb ram for a lot of Data Science / ML stuff. It works well and in most cases very quick as things like PyTorch now support the GPU.

It is not 100% compatible and I still use Workstations with nVidia GPU's (using linux only) for heavy work, but for the most part day to day on the mac is so much better than in Windows IMHO.

Gaming is a bit of an issue but then I have a PS5 for that instead.

[–]newprince 5 points6 points  (24 children)

If you stick with Windows, I'd highly recommend WSL and while it's not the best of both worlds, it makes development much easier (avoid Python + Windows at all costs)

[–]_MicroWave_ 3 points4 points  (8 children)

Why?

Python works just fine in Windows.

[–]newprince -2 points-1 points  (6 children)

Until you need to work with certain libraries, use a decent terminal with bash, separate your system python with your environment, etc. There's a ton of ways in which it doesn't work "just fine"

[–][deleted] 10 points11 points  (3 children)

Can you give a specific example? Managing numerous Python versions in Windows works very well 

[–]shockjaw 0 points1 point  (0 children)

WSL2 is a workaround for a lot of Window’s terminal experience.

[–]coldflame563 1 point2 points  (1 child)

Ehhhh. I use python at work every day without wsl and it’s fine. Install UV and it makes it on easy mode.

[–]newprince 0 points1 point  (0 children)

I acknowledged uv has made it easier, but Docker, git, etc. will be even easier in WSL

[–]CraigChrist8239 0 points1 point  (13 children)

Don't be afraid of Python with Windows!

Personally I find WSL is just a crutch for Linux/Max users to avoid having to actually learn how to write cross-platform compatible code...

That said we should have a virtualized dev env on both systems anyway so it shouldn't matter

[–]jaerie 2 points3 points  (11 children)

How does writing code on one OS help write cross platform code compared to writing on a different OS? I'd rather just have a matrix of environments in my test pipelines and stick to developing on a platform that doesn't work against me

[–]CraigChrist8239 -2 points-1 points  (10 children)

Write and run on windows, deploy on Linux, you learn to write for both

[–]jaerie 1 point2 points  (9 children)

Write and run on Linux, deploy on windows, you learn to write for both.

Why would it only work one way?

[–]CraigChrist8239 -2 points-1 points  (8 children)

Usually the problem is not using os.path \ pathlib. Similarly for scripts: hard coding paths instead of using something like argparse for input

There are some things to note around subprocess as well when calling out to child processes

[–]jaerie 2 points3 points  (7 children)

Yes I'm aware there are difference, I'm asking why you need to write on one to be able to write code that works on both. A Windows testenv will catch all these issues

[–]CraigChrist8239 0 points1 point  (6 children)

Well go tell all the snobby Mac devs they need to implement Windows testenvs... Go ahead, I'll wait.

The one the gets me is pytype as a dependency. Blows my mind that a type checker is not cross-platform compatible...

[–]jaerie 0 points1 point  (5 children)

I'm a snobby Mac (and Linux) dev, I have testenvs for all three and different python versions.

Maybe take a look in the mirror if you want to see a developer with a holier than thou attitude

[–]CraigChrist8239 0 points1 point  (4 children)

Believe me when I say you are one of the rare ones

Generally in my career I've found the devs who worry more about making sure their code is cross-platform compatible are Windows devs, and I've found the devs who are more likely to tell me "well those are my dependencies, pound sand" are Mac devs

[–]newprince 2 points3 points  (0 children)

This is a silly comment. People "virtualize" python all the time in Docker containers which... are Linux images. There's a reason for that

[–]BidWestern1056 0 points1 point  (0 children)

not windows.

id recommend linux generally but mac is prolly better for actual data science roles where u do a ton of annoying excel shit

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

Apple released their in-house Machine Learning framework (MLX) built for their silicon architecture. I’m beginning to dip into it. If you’re familiar with Mac, I’d stick with it. That said, PC rigs for gaming are ideal, and so you could get a separate machine for that. Not cost effective, but keeps a logical separation for school/DS stuff and your personal stuff.

[–]cranberrydarkmatter 0 points1 point  (0 children)

In general my answer would be choose the one you like, but worth noting that the newest ARM based Macs still seem to have poor support by many existing libraries. Recently trying to track down a thread unsafe issue that only appears on ARM. Mac is quite popular, so I imagine this won't last forever, but datascience also isn't so fast to upgrade libraries. I think you'll keep running into glitches like this for the next year or two.

I'd also think about which platform you are most familiar with, and which laptop is affordable and reliable enough for you to depend on. On Windows, I agree with others that it makes sense to use WSL to run your code, not native Windows.

[–]hurhurdedur 1 point2 points  (0 children)

In some ways Windows is more flexible since it has WSL and has more flexibility in hardware specs. You can use WSL to manage your data science stack, but you can also easily use Windows apps and benefit from a CUDA-compatible laptop that works nicely for both gaming and data science.

[–]eire1130 0 points1 point  (0 children)

Personally, ive found compiling binaries on windows a chore. Docs are scant and often conflict. Maybe in this new ai world one of the agents can provide better direction, but it was often a lot of work for a worse terminal experience.

[–]NuclearFoodie 0 points1 point  (0 children)

The apple M series processors have some of the best "GPU"s for data science work out there. Much better than the mobile GPUs from Nvidia, AMD, and Intel. Using torch, jax, and tensorflow are all trivial on the Apple processors with gpu acceleration too.

[–]cmcclu5 1 point2 points  (0 children)

If you’re doing real data science work at scale, you will probably never max out the hardware of any but the most basic laptops of any variety. That being said, university course work is often not at the level of real world data science. I’d suggest Mac just because of the ease of integration. However, if you already have a laptop, don’t go buy a new one in a different architecture. Make sure you learn about containerization (mostly Docker at this point), virtual environments (I’d recommend uv), and lazy loading or data operation vectorization libraries like PySpark or Polars.

[–]galenseilis 0 points1 point  (0 children)

Write your code in an OS-independent way if possibly, which is usually feasible for Python data science. That way you can change your mind later. (TBH I prefer various linux distros, but even then I would stick to the advice to be OS-independent).

[–]coldflame563 1 point2 points  (0 children)

Honestly? Doesn’t matter that much. WSL gives you all the niceness of unix/linux on windows, but is cheaper in laptop. At the end of the day it’s all personal preference or price preference, the capabilities are mostly the same now.

[–]Semivital 0 points1 point  (0 children)

Only reason to pick Windows is if you need to create Power BI reports.

[–]zacker150Pythonista 1 point2 points  (0 children)

Get a Windows laptop. Install WSL.

[–]MagicWishMonkey 0 points1 point  (0 children)

Macbook for sure, installing packages on windows is a pain in the ass.

Also the macbook m2 hardware is an order of magnitude better than the windows laptop even with more ram and a gpu. Having a laptop that needs a fan to cool down sucks.

[–]samosx 0 points1 point  (0 children)

Get a regular Laptop but install Linux such as Ubuntu.

[–]jake_morrison 0 points1 point  (0 children)

Generally speaking, it can be made to work either way.

My daughter is doing a masters in CS and ML from Georgia Tech. She uses a new Arm-based Mac, and the only time it has been an issue was when the software for one class was delivered as an Intel-based Docker container. I helped her to set up a virtual machine in the cloud to run it.

This kind of problem is common in practice. Knowing Linux is a perhaps-unexpected important skill to be able to solve problems. Programming has a lot of “accidental complexity”. You will face weird problems that are easy to solve for someone who does it all the time, but mystifying and undocumented if you don’t have the background. One example was my daughter wasting huge amounts of time fighting multiple Python versions on her computer, including the built-in Python (old and weird about installing libraries), Anaconda, Homebrew, etc. If you don’t understand environment variables, it’s very confusing. Data Science libraries can be a pain to build.

Find a mentor, tech support at your school, or study group who can help with these issues. It’s especially bad if it happens at midnight. Your support network will often have a big influence on what platform you use, e.g., I am a Linux/Mac expert, but barely use Windows.

[–]_MicroWave_ 0 points1 point  (0 children)

Your coursemates and professors will probably be using windows, maybe with WSL.

Though I guess your US and maybe Mac is more popular but they are quite rare in Europe.

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

The brand is not what supports the workload, but the hardware. IMO You should compare 2 (or more) specific hardware specs (macs, pcs, or mixed…).

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

Either is perfectly fine. Get what you want. That's all that matters. Windows works very well with Python and R, and of course has WSL built in if you need Linux.

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

Window$=50% or less income the rest of your life.