how do you install django older version using easy_install?

2024/10/15 18:26:29

I just broke my environment because of django 1.3. None of my sites are able to run.

So, i decided to use virtualenv to set virtual environment with different python version as well as django.

But, seems like if i download the package and install using "sudo python setup.py install" this does not get added to my virtual environment, but my original environment.

I tried "easy_install django" in virtual environment virtualenv_name/bin folder, and it worked, but the problem is django1.3 was chosen automatically and got added.

I want to install django 1.2.5, is there a way that i can install easily to my virtual env?

Answer

It's probably better to use Pip instead of easy_install.

Then make sure you create you virtualenv with the --no-site-packages-option.

For convenience you should consider using virtualenvwrapper in conjunction with virtualenv.

Check this introductory post to get an idea.

And finally make sure to specify the exact version you want to install. In your case try:

pip install django==1.2.5
https://en.xdnf.cn/q/69254.html

Related Q&A

Whats difference between findall() and iterfind() of xml.etree.ElementTree

I write a program using just like belowfrom xml.etree.ElementTree import ETxmlroot = ET.fromstring([my xml content])for element in xmlroot.iterfind(".//mytag"):do some thingit works fine on m…

How to convert string dataframe column to datetime as format with year and week?

Sample Data:Week Price 2011-31 1.58 2011-32 1.9 2011-33 1.9 2011-34 1.9I have a dataframe like above and I wanna convert Week column type from string to datetime.My Code:data[Date_Time…

Tensorflow - ValueError: Shape must be rank 1 but is rank 0 for ParseExample/ParseExample

I have a .tfrecords file of the Ubuntu Dialog Corpus. I am trying to read in the whole dataset so that I can split the contexts and utterances into batches. Using tf.parse_single_example I was able to …

Navigating Multi-Dimensional JSON arrays in Python

Im trying to figure out how to query a JSON array in Python. Could someone show me how to do a simple search and print through a fairly complex array please?The example Im using is here: http://eu.bat…

Numpy, apply a list of functions along array dimension

I have a list of functions of the type:func_list = [lambda x: function1(input),lambda x: function2(input),lambda x: function3(input),lambda x: x]and an array of shape [4, 200, 200, 1] (a batch of image…

Database first Django models

In ASP.NET there is entity framework or something called "database first," where entities are generated from an existing database. Is there something similar for Django? I usually work with …

How to use pythons Structural Pattern Matching to test built in types?

Im trying to use SPM to determine if a certain type is an int or an str. The following code: from typing import Typedef main(type_to_match: Type):match type_to_match:case str():print("This is a St…

Importing app when using Alembic raises ImportError

I am trying to study how to use alembic in flask, I want to import a method in flask app:tree . . ├── README.md ├── alembic │ ├── README │ ├── env.py │ ├── env.pyc │ ├── s…

Git add through python subprocess

I am trying to run git commands through python subprocess. I do this by calling the git.exe in the cmd directory of github.I managed to get most commands working (init, remote, status) but i get an err…

How to unread a line in python

I am new to Python (2.6), and have a situation where I need to un-read a line I just read from a file. Heres basically what I am doing.for line in file:print linefile.seek(-len(line),1)zz = file.readli…