Although most of us prefer the python version 2.6, today I tried to install the latest version of Django and Python 2.3.2.
Make a new folder, named test-dj.
1 2 | $mkdir test-dj $cd test-dj/ |
On the official site, I got the two archives:
1 2 | django-django-1.4-919-ge57338f.zip Python-3.2.3.tar.bz2 |
I will start with the installation of python.
We unzip the archive:
1 | $tar xvjf Python-3.2.3.tar.bz2 |
We execute the following commands to install python:
1 2 3 4 5 | $cd Python-3.2.3 $./configure $make all $sudo make altinstall # python3.2 setup.py install |
Let’s see what we have.
1 2 3 4 | $ whereis python3 python3: /usr/lib/python3.0 /usr/local/bin/python3.2m-config /usr/local/bin/python3.2 /usr/local/bin/python3.2m /usr/local/lib/python3.2 |
As you see it’s …
1 2 3 | python3.2 python3.2m python3.2m-config |
In accordance with the PEP-3149 we can get this:
Python implementations MAY include additional flags in the file name tag as appropriate.
For example, on POSIX systems these flags will also contribute to the file name:
1 2 3 | * --with-pydebug (flag: d) * --with-pymalloc (flag: m) * --with-wide-unicode (flag: u) |
Now we need to install Django.
1 | $unzip django-django-1.4-919-ge57338f.zip |
Go to the Django folder:
1 2 | $cd django-django-e57338f/ # python3.2 setup.py install |
Now, we can test it:
1 2 3 4 5 6 7 8 | # python3.2 Python 3.2.3 (default, Aug 24 2012, 19:24:21) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import django >>> print(django.get_version()) 1.5 >>> |
I will make another tutorial about how to configure the Django to have one website.
See more about python here.