After Python and virtualenv have been installed, a new virtual environment can be created for Django:
$ mkvirtualenv --distribute django-workshop
If virtualenvwrapper hasn’t been installed, execute the following command:
$ virtualenv --distribute .virtualenvs/django-workshop
What happens:
If virtualenvwrapper has been installed, the virtual environment is now already active.
Otherwise, it has to be activated manually:
$ cd .virtualenvs/django-workshop
$ . bin/activate
Now we can install Django into the activated virtual environment:
$ pip install django
If virtualenvwrapper has been installed, you can list the installed packages with the following command:
$ lssitepackages -l
Without virtualenvwrapper you can check the packages in the site-packages directory:
$ ls -l .virtualenvs/django-workshop/lib/python2.6/site-packages/
There you should see a folder django.
The Django version can be checked with this command:
$ django-admin.py --version
1.4