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/python-3.4.1/bin/python3

Step 6: Run setup.py from the Installation Directory of Python

# python setup.py install

Step 7: Install Python Modules (whatever you need. Here is an example)
You can use pip install to install packages using pip3. See Using pip to install python packages

# /usr/local/python-3.4.1/bin/pip3 install networkx
Advertisements

One thought on “Compiling and Configuring Python 3.4.1 on CentOS

  1. Pingback: Basic Setup and Configuration of JupyterHub with Python-3.4.3 | Linux Cluster

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s