如何在virtualenv上安装旧版本的Django? [英] How do I install an old version of Django on virtualenv?

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

问题描述

这可能听起来像一个愚蠢的问题,因为 virtualenv 的目的在于:正确安装一些特定版本的包(在这种情况下是Django)虚拟环境。但是这正是我想要做的,我无法理解。



我在Windows XP上,我成功创建了虚拟环境,而我我能够运行它,但我应该如何安装我想要的Django版本?我的意思是,我知道要使用新创建的 easy_install 脚本,但是如何使其安装Django 1.0.7?如果我执行 easy_install django ,它将安装最新版本。我尝试以各种方式将版本号 1.0.7 加入此命令,但无效。



我这样做?

解决方案

从来没有一个Django 1.0.7。 1.0系列只上升到1.0.4。您可以在Django代码存储库的标签部分查看所有版本。。 / p>

不过要回答你的问题,不要使用 easy_install ,使用 pip 。 (如果尚未安装,请执行 easy_install pip ,然后再重新连接easy_install)。现在你可以做:

  pip install Django == 1.0.4 
pre>

This may sound like a stupid question, since the very purpose of virtualenv is to this exactly: Installing some specific version of a package (in this case Django) inside the virtual environment. But it's exactly what I want to do, and 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?

解决方案

There was never a Django 1.0.7. The 1.0 series only went up to 1.0.4. You can see all the releases in the tags section of the Django code repository.

However to answer your question, don't use easy_install, use pip. (If it's not already installed, do easy_install pip, then never touch easy_install again). Now you can do:

pip install Django==1.0.4

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

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