Install Python 3
Please note: this is legacy documentation. Please check out https://docs.miarec.com/all/ for the most up-to-date documentation and user guides.
1. Preparing The System
Update system default applications:
Install required packages for building python:
yum install openssl-devel sqlite-devel bzip2-devel gcc wget
2. Build Python 3 From Source Code
Download the latest stable Python 3 source code files from https://www.python.org/downloads/source/. MiaRecWeb was tested with Python v.3.4
Extract source code:
tar -xzvf Python-3.*.tgz
Build Python binaries:
--enable-shared is necessary in order to create shared library *.so files, which will be used later when compiling Apache mod_wsgi module.
3. Install Python
Normally, one would use “make install”; however, in order not to override system defaults - replacing the Python already used by the system - we will use make altinstall.
This will install python into /usr/local/bin with name, which contains version, like
4. Add Python Shared Libraries To PATH
By default Python installed *.so files into
/usr/local/lib On some RedHat-based systems this directory is not searched when loading shared libraries. To fix that, you need to edit file
Add the following line to that file: