简体   繁体   English

如何在ubuntu上升级Django?

[英]How to upgrade Django on ubuntu?

Not a Django developer. 不是Django开发人员。 We initially installed Django from Ubuntu packages by typing apt-get install python-django . 我们最初通过输入apt-get install python-django从Ubuntu软件包apt-get install python-django Now we need version 1.x - our version is 0.96.1 Could you advise an easy way to upgrade? 现在我们需要版本1.x - 我们的版本是0.96.1你能建议一个简单的升级方法吗?

Easiest way to upgrade Django on Ububtu is to make use of the easy_install script provided by the python-setuptools package. 在Ububtu上升级Django的最简单方法是使用python-setuptools包提供的easy_install脚本。

sudo apt-get install python-setuptools
sudo easy_install --upgrade django

If you really can't upgrade the Ubuntu package as suggested by Ludwik, you might want to consider installing the source directly. 如果您真的无法按照Ludwik的建议升级Ubuntu软件包,您可能需要考虑直接安装源代码。 It's pretty easy, and is fully documented here . 这很简单,并在此完整记录

It looks like you've got a really old version of Ubuntu. 看起来你有一个非常老的Ubuntu版本。 Django 0.96.1 was distributed last time with Ubuntu 8.04. 上次使用Ubuntu 8.04分发了Django 0.96.1。 Official repositories for the most recent Ubuntu 9.10 includes Django 1.1.1, which is the most recent version of Django. 最新的Ubuntu 9.10的官方存储库包括Django 1.1.1,这是Django的最新版本。 You can upgrade Ubuntu or try to install the new .deb package in your old OS (although I can't promise that all dependencies will be met by Ubuntu 8.04). 您可以升级Ubuntu或尝试在旧操作系统中安装新的.deb软件包 (尽管我不能保证Ubuntu 8.04会满足所有依赖项)。

其中一种方法是在控制台上输入以下命令:

pip install --upgrade django

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM