I was asked this question on Quora. Normally I don’t like to fight for operating systems. I believe every OS is awesome in there own way. Different people have different needs. It’s one of the sweetest reasons for why we have so many operating systems on our planet. So I have just tried to share my own thoughts on why I am using Linux for Python programming. Please correct me if I make any wrong statement.

Is Python X-Platform language?

Python can run on any modern platform (e.g. Linux, macOS, Windows). So theoretically, you can code in Python on any platform, even on mobile or web. If you write a program on Windows, it should run on Linux too. The statement is true for vice-versa case and for macOS too.

What is my personal experience?

I’m a DevOps Engineer at Telenor Health. Sometimes I write automation tools in Python3 on macOS (office-provided) and they run on Linux at production. Please let me express my point of view in this case. MacOS is a UNIX system and Linux seems to be a UNIX alike system. So we never face any big challenge to get the tools run on Linux. In some case, we really face some issues. For example, psycopg2 module differs from platform to platform because of a PostgreSQL binding. So if I ship psycopg2 module from macOS to Linux instead of installing via pip(in case of AWS Lambda), then it causes issues. It’s a very lower-level, shitty example, I know.

What does my story express?

It expresses that if the development environment can be alike production system, then we can get rid of deployment hassle (docker is out of the scene now). I wish I could code on Linux at the office. I use macOS because of stability and I feel royal here (rubbish reason may be).

What is the actual benefit?

The actual benefit of using Linux is community support. I have been using Linux since 2011. I feel that Linux community is more supportive than Windows community. Maybe, the reason is that Linux is free while Windows is paid. If we search on Google, we can get thousands of tutorials where the demo is being shown on Linux. Isn’t it the biggest benefit of a learner/beginner?

Punchline: Most of the servers run on Linux in where your Python code will run, so why shouldn’t you code on Linux in Python which will go to production one day?