Hướng dẫn check all python versions
I just started setting up a centos server today and noticed that the default version of python on centos is set to 2.6.6. I want to use python 2.7 instead. I googled around and found that 2.6.6 is used by system tools such as YUM so I should not tamper with it. Then I opened up a terminal on my mac and found that I had python 2.6.8 and 2.7.5 and 3.3.3 installed. Sorry for the long story. In short I just want to know how to lookup all the version of python installed on centos so I don't accidentally install it twice. asked May 26, 2015 at 17:18
2 The more easy way its by executing the next command:
Output look like this:
Asif Raza 3,2072 gold badges25 silver badges40 bronze badges answered Aug 23, 2016 at 12:34
Gabriel CaceresGabriel Caceres 1,5091 gold badge8 silver badges2 bronze badges 8 we can directly use this to see all the pythons installed both by current user and the root by the following: answered Jun 15, 2019 at 0:51
Ke LiKe Li 3312 silver badges4 bronze badges Find out which version of Python is installed by issuing the command python --version: $ python --version Python 2.7.10 If you see something like this, Python 2.7 is your default version. You can also see if you have Python 3 installed:
If you also want to know the path where it is installed, you can issue the command "which" with python and python3:
answered Mar 13, 2019 at 15:35
KPandianKPandian 1,0989 silver badges8 bronze badges Here is a cleaner way to show them (technically without symbolic links). This includes python2 and python3 installs:
Where Or using
Which shows all the different (
answered Aug 13, 2019 at 21:04
danbrosdanbros 1511 silver badge3 bronze badges Use, yum list installed command to find the packages you installed. answered May 26, 2015 at 18:31
lpsandaruwanlpsandaruwan 7602 gold badges10 silver badges27 bronze badges 3 As someone mentioned in a comment, you can use answered May 26, 2015 at 18:15
jm13firejm13fire 1851 silver badge7 bronze badges COMMAND: OUTPUT:
ALIAS COMMAND: OUTPUT:
You can make an alias like "pyver" in your .bashrc file or else using a text accelerator like AText maybe.
Nikaido 4,0725 gold badges32 silver badges43 bronze badges answered Sep 30, 2019 at 17:19
1 It depends on your default version of python setup. You can query by Python Version:
answered Sep 9, 2019 at 3:39
This lists some other python things too, But hey, You can identify all python versions among them. answered Dec 13, 2020 at 13:16
Appaji ChintimiAppaji Chintimi 4961 gold badge6 silver badges17 bronze badges Sift through the output of this script.
answered Aug 19, 2021 at 9:34
tsmtsm 3993 silver badges10 bronze badges
answered Oct 11, 2021 at 22:34
george manogeorge mano 5,6306 gold badges31 silver badges43 bronze badges I would add to @nurealam siddiq answer,
answered Nov 28, 2021 at 13:55
SinghSingh 4063 silver badges12 bronze badges |