Python / Django开发,windows或linux? [英] Python/Django development, windows or linux?
问题描述
所以我开始想知道为什么大多数人使用Linux与Python,将是一个很好的举动(知道我的Linux知识是完全无效的)学习使用Linux的开发目的?它能让我在Python中开发更加有效吗?可以列出这样做的好处吗?
我在Windows中使用了很多时间进行Django开发,但终于认为Linux是更好的方式。以下是一些原因:
- 某些Python软件包无法在Windows中完全安装或正确安装,否则会造成很多麻烦你这样做
- 如果您需要部署Django应用程序,那么使用Unix风格的系统更有意义,只是因为99%的部署可能与您的部署环境相同。在本地机器上执行相同配置的干运行会节省你很多时间,在这里你可以允许犯错误。
- 如果你的应用程序变得复杂在Linux中更容易获得所需的依赖关系,无论是扩展名,库还是等等。在Windows中,最终找到正确的站点来下载所有内容并进行安装和配置的麻烦。有时候我花了很多时间寻找一些特定的东西。在Linux中,它通常只是一个apt-get(或类似的),你完成了。
- 我提到在Linux中获得和安装一切都更快吗?
当然,如果你的应用程序很简单,你不需要关心部署,那么Windows就可以了。
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?
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.
这篇关于Python / Django开发,windows或linux?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!