Compile Python 3.4 on CentOS 7


This is just a short post to document the required commands to build Python 3 on a CentOS 7.

First we need to install the Development tools and some required sources: e.g. bzip, to support compression in python

Next we are downloading and compiling Python 3 as shared library. Compiling Python as shared library is afaik quite common and necessary for third-party tools such as mod_wsgi.

Before we can use Python we need to make the library findable:

Finally you should be able to launch python:

If you want to remove all the packages we required to compile python, including its dependencies, use the parameter “–remove-leaves” which I also described here.


Leave a comment

Your email address will not be published. Required fields are marked *

12 thoughts on “Compile Python 3.4 on CentOS 7