Chander Shivdasani Chander Shivdasani - 1 year ago 86
Python Question

Problems installing python3 on RHEL

I'm trying to install python3 on RHEL using the following steps:

yum search python3

Which returned
No matches found for: python3

Followed by:

yum search python

None of the search results contained python3. What should I try next?

Answer Source

It is easy to install it manually:

  1. Download (there may be newer releases on

    $ wget
  2. Unzip

    $ tar xf Python-3.* 
    $ cd Python-3.*
  3. Prepare compilation

    $ ./configure
  4. Build

    $ make
  5. Install

    $ make install

    OR if you don't want to overwrite the python executable (safer, at least on some distros yum needs python to be 2.x, such as for RHEL6) - you can install python3.* as a concurrent instance to the system default with an altinstall:

    $ make altinstall

Now if you want an alternative installation directory, you can pass --prefix to the configurecommand.

Example: for 'installing' Python in /opt/local, just add --prefix=/opt/local.

After the make install step: In order to use your new Python installation, it could be, that you still have to add the [prefix]/bin to the $PATH and [prefix]/lib to the $LD_LIBRARY_PATH (depending of the --prefix you passed)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download