How do I install an old version of Django on virtualenv?

Viewed 82824

I want to install some specific version of a package (in this case Django) inside the virtual environment. I can't figure it out.

I'm on Windows XP, and I created the virtual environment successfully, and I'm able to run it, but how am I supposed to install the Django version I want into it? I mean, I know to use the newly-created easy_install script, but how do I make it install Django 1.0.7? If I do easy_install django, it will install the latest version. I tried putting the version number 1.0.7 into this command in various ways, but nothing worked.

How do I do this?

5 Answers

+1 for already mentioned solutions.

I just wanna add another solution.

To install a specific version of Django (say 1.10.x),

  1. Clone the Django repo from Github.

    git clone https://github.com/django/django.git

  2. Go into the directory and checkout to the specific branch.

    cd django

    git checkout origin/stable/1.10.x

  3. Run install command.

    python setup.py install

pip install "django>=2.2,<3" To install djnago 2.2

pip install django==(the desired version ex: 1.8.4)

This will allow you to install the desired version, and I tried on OS:Windows10 and it perfectly worked.

Related