Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python/Django development, windows or linux? [closed]

I have been working on Python quite a lot recently and started reading the doc for Django, however I can't deny the fact that most of the video tutorials I find usually shows Linux as the chosen OS. I've ignored this mostly, but I started to come upon some problems with people using commands such as "touch" for which I have no idea about what the equivalent is in the Windows 7 command prompt. I've heard about New-Item in Power Shell, however it's messy and I am fearing that this "equivalent hunt" might come again and again...

So I started to wonder why were most of the people using Linux with Python, would be a good move (knowing that my Linux knowledge is completely null) to learn to use Linux for development purpose? Would it allow me to be more efficient at developing with Python in general? Would it be possible to list the benefits of doing so?

like image 304
Estarius Avatar asked Jul 05 '12 05:07

Estarius


People also ask

Which OS is best for Django development?

5 Answers. Show activity on this post. I used Windows for quite some time for Django development, but finally figured out that Linux is simply the better way to go.

Does Django run on Linux?

Django Overview There are many different ways to install Django on Ubuntu: Django installation with pip in a virtual environment: By installing pip, any user on the system can install and use Django. The pip should always contain the latest stable Django.

Which environment is best for Django?

The Django developer team itself recommends that you use Python virtual environments!

Can Django run on Windows?

It is free and open-source, and it works on both Windows and *nix systems. In this tutorial, you will learn how to install Django on Windows using pip . After that, you will verify the installation, create a project, and start a Django development server.


2 Answers

I used Windows for quite some time for Django development, but finally figured out that Linux is simply the better way to go. Here are some reasons why:

  • some Python packages can not be installed at all or correctly in Windows OR it will create a lot of hassle for you to do so
  • if you need to deploy your Django app it makes more sense to use a Unix-flavored system, simply because its 99% likely that you deployment environment is the same. Doing a dry run on your local machine with the same configuration will save you a lot of time later on + here you are "allowed" to make mistakes.
  • If your apps gets complex its way easier in Linux to get the required dependencies, be it extensions, libraries, etc.. In Windows you end up looking for the right site to download everything and go through some hassle of installation and configuration. It took me lots of time to just search for some specific things sometimes. In Linux its often just an "apt-get" (or similiar) and you are done.
  • Did I mention that everything is faster to get and install in Linux?

Of course if your app is simple and you don't need to care about the deployment then Windows is fine.

like image 106
Torsten Engelbrecht Avatar answered Sep 18 '22 13:09

Torsten Engelbrecht


Although there are some benefits in using Linux for Python development (for example, some libraries only work on Linux); there is nothing stopping you from using Windows for django work; I use it everyday and nothing has yet to crop up.

The right IDE that you are comfortable with will go a long way towards making your development experience more enjoyable. Many people use Pydev with Eclipse; but I prefer PyCharm

A lot of the tutorials will show you a Linux or Mac desktop (and shell) and you can get the equivalent commands (like touch, ls and others) by installing unixtools - which are native versions of common unix tools.

You should bookmark this website which has Windows installers for common Python libraries.

like image 30
Burhan Khalid Avatar answered Sep 18 '22 13:09

Burhan Khalid