Hoopdady
Hoopdady

Reputation: 2356

Installing Older Version of Django

I'm trying to install django version 1.3.3 using pip. I have version 1.5.1, so I uninstalled it and ran this command

sudo pip install django==1.3.3

When I run it, I get this response

$ sudo pip install django==1.3.3
Downloading/unpacking django==1.3.3
Running setup.py egg_info for package django

warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Requested django==1.3.3, but installing version 1.5.1
Installing collected packages: django
Running setup.py install for django

warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
changing mode of /usr/local/bin/django-admin.py to 755
Successfully installed django
Cleaning up...

Its a little upsetting that it tells me, it knows I want 1.3.3.... but its going install 1.5 for me anyway. How can I tell it I really want 1.3.3?

Upvotes: 3

Views: 5458

Answers (1)

Eiyrioü von Kauyf
Eiyrioü von Kauyf

Reputation: 4735

First clean your cache for anything that looks Django-like in:

~/.pip 
~/tmp

or place a 'clean' place to install it to using the --download-cache option

for different versions use a virtualenv to install. as sudo pip install installs it globally

What version of pip are you using? This should have been fixed in pip >=1.4 (the newest one currently). It might help you in the future to reinstall pip/build from source depending on where you're getting your packages from.

I know currently on Debian with my config I can only install:

python-pip |      1.1-3 | http://ftp.us.debian.org/debian/ wheezy/main Sources

which as you can see does not include 1.4.

the relevant command to generate the version #'s is apt-cache madison <package>, yup madison is actually the name of the parameter.

By the way on my version (1.3) pip install -i is:

  -i URL, --index-url=URL, --pypi-url=URL
                        Base URL of Python Package Index (default
                        http://pypi.python.org/simple/)

which is not ignore, though there is

  -I, --ignore-installed
                        Ignore the installed packages (reinstalling instead)

but in your case that would probably muddle things up because of django's global install

Relevant: pip install: How to force a specific package version

Upvotes: 2

Related Questions