Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running python on a Windows machine vs Linux

Tags:

python

windows

I am interested in learning python but my Linux skills suck. I would like to develop a medium to large scale web application using python and django but afraid the software may not work well on a windows box. Is there a performance difference in running python on Linux vs Windows? Is there anything that I should watch out for when developing the application. Also, I am aware that it is very easy integrating C++ libraries with python. Is this statement still true is the code is on a windows box?

like image 559
Luke101 Avatar asked Sep 21 '10 23:09

Luke101


People also ask

Is Linux better than Windows for Python?

👨‍💻 Programming Friendly Linux supports almost all of the programming languages such as Clojure, Python, Julia, Ruby, C, and C++ to name a few. The Linux terminal is better than Window's command line.

Is Python the same on Linux and Windows?

Remember, Python is installed in the Linux distro, which means if you're editing Python files on the Windows side, you can't run or debug them unless you install the same Python development stack on Windows.

Does Python run better on Windows?

Use whichever you got. Both will work just fine. If you have unlimited budget, MacOS is built on Next Unix, so it is built on Unix.

Which OS is better for Python?

However, Python, R, and Octave, the top three programming languages for Machine Learning, run best on Linux-based operating systems.


3 Answers

Don't tell anybody this, but I've run python/django on windows. It works all right and the performance hit isn't any worse than you would expect from windows. I used MySQL and it installed without a problem. I had to grope around to find out how to manage it (no good ol' sudo /etc/init.d/mysql restart but i eventually found a graphical interface to do what I needed.

like image 119
aaronasterling Avatar answered Oct 27 '22 23:10

aaronasterling


but afraid the software may not work well on a windows box.

Your software will work. The Windows OS may not work as you hope. But that's Windows, not Python.

We develop 100% on Windows. We completely test: Unit test, integration test and user acceptance test on Windows. 100%.

We deploy for production 0% on Windows, 100% on Linux.

We have a few (less than 6) differences in the unit tests that are Windows-specific.

The application has no changes. It works with Apache or not. It works with SQLite or MySQL.

like image 20
S.Lott Avatar answered Oct 27 '22 22:10

S.Lott


I've been working Py on both Windows and Linux. I favor Linux because of several things:

  1. virtualenvs - once you start working with virtualenvs, there is no turning back.
  2. SHELL - CMD is very frustrating when executing python/management commands in django. Also, you should add python.exe every time :).
  3. ipython works better on Linux.
  4. GeoDjango doesn't work on Vista/7 last time i checked. I spent 3 days trying to set it up. Just for comparison, i set GeoDjango-able development environment in 20 minutes in Linux.
  5. Linux is free :)
  6. Although there is no visible performance impact or incompatibility when working python cross-platform, the benefits of Linux for python development outweigh Windows by a lot. It's a lot more comfortable and definitely will boost your productivity.
  7. ...

IMHO Linux is the smart choice for Python development.

like image 20
dekomote Avatar answered Oct 28 '22 00:10

dekomote