What linux distro is better suited for Python web

2020-07-10 07:29发布

Which linux distro is better suited for Python web development?

Background:

I currently develop on Windows and it's fine, but I am looking to move my core Python development to Linux. I'm sure most any distro will work fine, but does anyone have any reasons to believe one distro is better than another?

9条回答
Bombasti
2楼-- · 2020-07-10 08:11

I use RHEL and have been very happy, so from that I would say Fedora would be fine. I use Debian at home, and it's great (headless though, so no web there).

That said, I think you should probably just pick one based on what your company uses, or any number of non-Python reasons. I don't think you are going to find Python tool availability an issue with any Linux distribution.

查看更多
放荡不羁爱自由
3楼-- · 2020-07-10 08:15

Any desktop distribution like Ubuntu, OpenSUSE, Fedora, ... is OK, But if you want to always have the latest versions, I recommend ArchLinux.

查看更多
聊天终结者
4楼-- · 2020-07-10 08:17

Using a distribution with the latest stable versions of Python only lets you test your code with those versions. Today it's very easy for developers to test their code with multiple Python versions.

Gentoo probably gives you the most flexibility with multiple Python versions installed at once:

    (2.5)  2.5.4-r4
    (2.6)  2.6.6-r2  or 2.6.7-r2
    (2.7)  2.7.2-r3
    (3.1)  3.1.4-r3
    (3.2)  3.2.2

That doesn't let you test on some older versions that are very popular on Debian based systems, for example.

pythonbrew lets you compile and install multiple Python versions in your home directory, no root access needed.

It's a snap testing your code with multiple versions of Python thanks to 'tox'. By default, tox will find your system python(s), but you can set custom interpreters you build with pythonbrew, for example.

Here's a tox.ini you can use with Jenkins, for continuous integration. With this setup you can install jenkins then 'su - jenkins' and use pythonbrew to install all the Python versions you want to test.

[tox]
envlist = py267,py271,py272

[testenv]
#You may need to change this. Are your tests here?
changedir=tests

#You can also use nose, etc., see documentation
deps=pytest
commands=py.test --junitxml=junit-{envname}.xml

[testenv:py272]
basepython=/var/lib/jenkins/.pythonbrew/pythons/Python-2.7.2/bin/python2.7

[testenv:py271]
basepython=/var/lib/jenkins/.pythonbrew/pythons/Python-2.7.1/bin/python2.7

[testenv:py267]
basepython=/var/lib/jenkins/.pythonbrew/pythons/Python-2.6.7/bin/python2.6

It's that easy, and it doesn't matter which Linux distribution you use.

See the Tox website for details on configuring Jenkins.

查看更多
Fickle 薄情
5楼-- · 2020-07-10 08:19

As the other answers have mentioned so far, the Python 2.6 interpreter will be available on all recent Linux distribution releases. That shouldn't influence your choice.

However, your choice of IDE may eliminate some possibilities. You should make sure the distribution you select has a package for the latest version of your IDE, and that it is updated often enough.

As an example, I like to use Eclipse with PyDev for developing Python apps in either OS, but Ubuntu's official repositories had only Eclipse 3.2 (from 2006) until October of last year, when they finally updated to 3.5 in the latest distribution.

查看更多
狗以群分
6楼-- · 2020-07-10 08:19

i think i remember a podcast with Guido Van Rossum and his core team python developers back in the days, and one of that core python developer is now employed by Canonical to take care of python integration for the ubuntu distro. So that explains why ubuntu is a much more pythonic distro compared to other distro.

On the other hand, the gentoo linux distro also has python integrated in its Portage package management system. So gentoo and ubuntu I would say are good for python development system and each represent both ends of the spectrum.

查看更多
ゆ 、 Hurt°
7楼-- · 2020-07-10 08:25

Largely distribution won't matter, as Python is present and largely self sufficient on virtually all Linux distributions.

If you're wanting to focus on development, I'd recommend Ubuntu. Ubuntu is arguably one of the most fully featured "ready for the user" distributions that makes system administration a snap, so you can focus on the development tasks you want to tackle.

If you have a Linux environment that's a target for your code (like say, RedHat or something), then go with the desktop distribution that matches your target environment (like, say, Fedora for RedHat, Gentoo for Gentoo, Ubuntu for Ubuntu Server, etc.)

Otherwise, all of them are suitable.

查看更多
登录 后发表回答