Install Python 3.4.4 and Django on CentOS/RHEL/EL 6.7

# yum groupinstall "Development tools"
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
$ wget
$ tar xf Python-3.*
$ cd Python-3.*

uncomment string
zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
in file Modules/Setup

$ ./configure --prefix=/usr/local LDFLAGS="-Wl,-rpath /usr/local/lib"
$ make
# make install

Check version with
$ python3.4 -V

Install virtual environment and django
# pip3.4 install virtualenv

$ pyvenv-3.4 logger
$ source logger/bin/activate
$ python -V # must be 3.4.4
$ pip install --upgrade pip
$ pip install django, django-tables2
$ deactivate


Multilib problem:
Error: Package: glibc-2.12-1.149.el6.i686 (CentOS-OS)
Requires: glibc-common = 2.12-1.149.el6
Installed: glibc-common-2.12-1.149.el6_6.5.x86_64 (@updates)
glibc-common = 2.12-1.149.el6_6.5

Fixed with commands:
yum downgrade glibc glibc-headers glibc-common glibc-devel
yum install glibc-static

Download RPM packages from
Make requrement file from your local development environment:
pip install --download /path/to/dir/ -r requirements.txt
Upload packages on server and Install it:
pip install --no-index --find-links=/path/to/dir/ -r requirements.txt

Leave a Reply

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