Wednesday, January 18, 2017

Installing Django on Centos 7

Run below commands as root or sudo.  Root # prompt shown below.

# yum install epel-release

# yum install python34

# yum install python3-pip

# pip3 install --upgrade pip

# pip3 install virtualenv

As normal user

$ virtualenv --python=`which python3` ~/.virtualenvs/djangodev


Now close django.git in your git hub account.

then

git clone git@github.com:rakeshrp/django.git

where rakeshrp is my github user.


Now to install Django

(djangodev) [wb003c@hpcentos ~]$ pip3 install -e ./django/
Obtaining file:///home/wb003c/django
Collecting pytz (from Django==2.0.dev20170118203328)
  Downloading pytz-2016.10-py2.py3-none-any.whl (483kB)
    100% |████████████████████████████████| 491kB 2.2MB/s
Installing collected packages: pytz, Django
  Running setup.py develop for Django
Successfully installed Django pytz-2016.10
(djangodev) [wb003c@hpcentos ~]$


Run some tests

$ cd django/tests
$ ./runtests.py



Happy Web development :)




No comments:

Post a Comment

Followers

About Me

Torrance, CA, United States