Wednesday, January 14, 2015

Compiling and Configuring Python 3.4.1 on CentOS

Step 1: Remember to turn on RPMForge and EPEL Repository. For more information on repository, see Repository of CentOS 6 and Scientific Linux 6 

Step 2: Download Python-3.4.1 from the Python Download Page

Step 3: Install Prerequisite Software
# yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel

Step 4: Configure and Build
# cd /installation_home/Python-3.4.1
# ./configure --prefix=/usr/local/python-3.4.1
# make
# make install

Step 5: Check that scripts query the correct interpreter:
#/usr/local/python3/bin/python3

Step 6: Install Scientific Components (Optional: If you requires it) Scipy Stack (for scientific packages in python)
# yum install numpy scipy python-matplotlib ipython python-pandas sympy python-nose

Step 7: Install Python Modules (whatever you need. Here is an example)
# /usr/local/python-3.4.1/bin/pip3 install networkx

No comments: