Sunday, August 12, 2012

Installing Python3 on CentOS 6

The latest release of the python scripting language is Python 3.2.3.

But CentOS 6 only comes with 2.6 not event the latest 2.7!

# Install required build dependencies

yum install gcc make openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel

# Download the latest source code package


# Uncompress
tar xzvf Python-3.2.3.tgz cd Python-3.2.3

# Configure with prefix (install dir) to /opt/python3

./configure --prefix=/opt/python3

# Compile, Install and Make link

make sudo make install

# ln -s /opt/python3/bin/python3 /usr/bin/python3

# Verify the installation



  1. Hi, I recently came across a web site by way of Bing whilst buying a pertinent issue, your site emerged, seems superior. Relating to book-marked that with my google and yahoo favorite bookmarks.

  2. Thanks! If you leave both installs of python on there then just have to remember to run as python3 a the shell and !# /usr/bin/python in the script.

  3. Thanks for the comment.
    And you are right.

  4. It's very straightforward to find out any topic on web as compared to
    books, as I found this article at this site.

  5. Hi there! I simply would like to offer you a big thumbs up for the great information you have got
    here on this post. I am returning to your web site for more soon.