Too many python installations. Should i remove them all and install the latest?

David bouncingcats at gmail.com
Fri May 31 18:50:00 EDT 2013


On 01/06/2013, Νικόλαος Κούρας <nikos.gr33k at gmail.com> wrote:
>
> Why so many pythons in my system.

Explained below, underneath each pertinent info you provided.

First, let's discuss Python 2.6:

On 01/06/2013, Νικόλαος Κούρας <nikos.gr33k at gmail.com> wrote:
> I'am using CentOS v6.4 on my VPS and hence 'yum' install manager and i just
> tried:
>
> Code:
> root at nikos [~]# which python
> /usr/bin/python

This is the version of that CentOS 6 is using. It is Python 2.6 as
shown in the next paragraph. This version is essential to CentOS 6.
This cannot be changed or upgraded without so much work that no sane
person on the planet would bother. Stop worrying about it.

On 01/06/2013, Νικόλαος Κούρας <nikos.gr33k at gmail.com> wrote:
>
> root at nikos [~]# python -V
> Python 2.6.6

See above.

On 01/06/2013, Νικόλαος Κούρας <nikos.gr33k at gmail.com> wrote:
>
> root at nikos [/]# ls -l /usr/bin/python*
> -rwxr-xr-x 3 root root 4864 Feb 22 02:00 /usr/bin/python*
> lrwxrwxrwx 1 root root    6 Apr  5 20:34 /usr/bin/python2 -> python*
> -rwxr-xr-x 3 root root 4864 Feb 22 02:00 /usr/bin/python2.6*
> -rwxr-xr-x 1 root root 1418 Feb 22 02:00 /usr/bin/python2.6-config*
[... python3 line removed for clarity ...]
> lrwxrwxrwx 1 root root   16 Apr  5 20:35 /usr/bin/python-config ->
> python2.6-config*

Apart from the bizarre trailing '*' characters which for which I have
no sane explanation, all of the above is standard for Python 2.6 which
is essential for Centos 6. Stop worrying about it.

Now let's talk about yum:

On 01/06/2013, Νικόλαος Κούρας <nikos.gr33k at gmail.com> wrote:
> root at nikos [~]# yum remove python3
[...]
> No Match for argument: python3
[...]
> root at nikos [~]# yum remove python3.3
[...]
> No Match for argument: python3.3
>
> i don'y understand, why didnt it removed it neither of ways?

Your yum setup does not find python3 or python3.3 packages.
So you could not have used yum to install it.
Therefore, you cannot use yum to remove it.
And, you cannot use yum to install it.

Now let's talk about Python 2.7:

On 01/06/2013, Νικόλαος Κούρας <nikos.gr33k at gmail.com> wrote:
> root at nikos [~]# which python3
> /root/.local/lib/python2.7/bin/python3

There's a python2.7 directory there under /root/.local. Maybe you
installed python2.7 from source using some kind of 'make install'
command (ie not using yum)? If so, and you wish to remove it, there
will probably be another 'make' command to remove it, which must be
run from the same directory that you ran 'make install'. Try 'make
help' in that directory. Maybe someone else can explain why there is a
python3 command under that directory, because I can't.

Now let's talk about Python 3:

On 01/06/2013, Νικόλαος Κούρας <nikos.gr33k at gmail.com> wrote:
>
> root at nikos [~]# ls -al /usr/bin/python*
[...]
> lrwxrwxrwx 1 root root   24 Apr  7 22:10 /usr/bin/python3 ->
> /opt/python3/bin/python3*

There's a python3 directory there under /opt. Maybe you installed
python3 from source using some kind of 'make install' command (ie not
using yum)? If so, and you wish to remove it, there will probably be
another 'make' command to remove it, which must be run from the same
directory that you ran 'make install'. Try 'make help' in that
directory.

On 01/06/2013, Νικόλαος Κούρας <nikos.gr33k at gmail.com> wrote:
>
> OMG i gave by mistake
>
> root at nikos [/]# rm -rf /root/.local/
>
> did i screwed up my remote VPS which i host 10 peoples webpages?

When trying something you don't fully understand, first experiment
somewhere you don't care if bad things happen.

On 01/06/2013, Νικόλαος Κούρας <nikos.gr33k at gmail.com> wrote:
> Should i remove them all and install the latest?

No. Different versions do different things. Don't install or remove
them until you understand the different things they do.



More information about the Python-list mailing list