如何使用easy_install安装django旧版本? [英] how do you install django older version using easy_install?

查看:99
本文介绍了如何使用easy_install安装django旧版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚打破了我的环境,因为django 1.3。我的网站都没有能够运行。



所以,我决定使用virtualenv设置不同的python版本以及django的虚拟环境。



但是,似乎如果我下载软件包并使用sudo python setup.py install安装,这不会添加到我的虚拟环境,而是我原来的环境。



我在虚拟环境virtualenv_name / bin文件夹中尝试过easy_install django,它的工作原理,但问题是django1.3被自动选择并添加。 >

我要安装django 1.2.5,有没有办法可以轻松安装到我的虚拟环境?

解决方案

最好使用 Pip而不是easy_install



然后确保您创建您的virtualenv - 无站点包 -option。



为方便起见,您应该考虑使用 virtualenvwrapper 与virtualenv一起使用。



检查这个介绍性的帖子来获得想法。



最后确保指定要安装的确切版本
在你的情况下,尝试:

  pip install django == 1.2.5 


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?

解决方案

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

这篇关于如何使用easy_install安装django旧版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆