

Change directory to where local Python binary is $ cd ~/usr/local/binĬreate an alias so you can refer to it as python3. You now want to add ~/usr/local/bin to your $PATH so you don’t have to enter the full path to the Python binary every time you want to use it. Change directory to the un-tar’ed source $ cd Python-3.3.2Ĭreate a directory where you will install your local $ mkdir -p ~/usr/localĬompile and install Python to the directory you just $ make altinstall prefix=$HOME/usr/local exec-prefix=$HOME/usr/local Modify your $PATH You now have Python source and tools to compile it. You should see these two items in your home $ ls Python-3.3.2 Python-3.3.2.tar.bz2 Compile and Install Python Now just un-tar the file so you can use its $ tar xvf Python-3.3.2.tar.bz2 Head over to and download the version you want to install.

You also need some libraries that Python uses to provide “batteries included” $ su -c 'yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel' Download Python Source Code The easiest way to obtain them in CentOS is to install the ‘Development Tools’ $ su -c 'yum groupinstall "Development Tools"' You will need some tools to compile Python. This is a good alternative especially since Python3 is not officially available in CentOS 6.4.
