Which python to use on Enterprise Linux? [closed] – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.
But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, centos, redhat, python, .
I’m currently learning python and I recently bought a book that goes through Python 3. Where I work we use Red Hat Enterprise Linux, and I’ve noticed that on RHEL 5 and RHEL 6 the versions of python are 2.4 and 2.6 respectively.
Obviously an enterprise-grade distro like Red Hat is cautious to include upstream packages, but is it any use for me to learn a version of python that is not included in the distro?
If so, what’s the convention of installing python 3 on Red Hat and using that version for programs I develop? I would think I would not want to break the current version of python installed in /usr/bin because of the dependencies, so would convention be for me to install python 3 from source into /usr/local/bin? Or where else would I put it?
Any thoughts/comments would be appreciated.
You can install Python 3 alongside 2 as long as it’s configured to a different folder. Then it’s just a matter of pointing your scripts to the proper install of python.
I think that python.org has this covered quite nicely on their wiki.
For most part, python 2 is feature frozen, but should be supported for quite a while. A lot of stuff relies on it, and some major software needs it. Python 2 is the status quo, and you are VERY likely to find this on almost any major distro.
Python 3 has a lot of new shiny stuff, and a syntax that’s similar enough to work out how to migrate between them. I’ve learnt python 3, and for simpler stuff, there’s no significant difference. Some stuff works differently. Python 3 is the future. You have nothing to lose by learning this.
I’d say, learn both!
More importantly tho, they are designed to run side by side – you select which one to run by the command interpreter selection on your scripts.
#!python2 will invoke python2. Using
#!python3 will let you run python 3 scripts.