如何在Ubuntu 11.10中安装Django [英] How to install Django in Ubuntu 11.10

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

问题描述

我对Ubuntu OS和Python也很陌生.我想安装Django.但是我没有easy_install,我尝试了以下命令来安装pip

I am very new to Ubuntu OS and Python as well. I want to install Django. But i dont have easy_install and I tried below command to install pip

sudo apt-get install python-pip

我收到如下错误

Unable to locate package python-pip

我也尝试了以下命令

sudo apt-get install python-pip

我得到如下错误

E: Package 'python-setuptools' has no installation candidate

我对安装django非常困惑,如何成功安装django

I am very confused in installing django, How to successfully install django

推荐答案

安装

首先,您需要确保已安装Python,此处以2.7.6为例.有关如何安装Python的信息,请检查以下链接:

First you need make sure you have Python install, here I take 2.7.6 as example. For how to install Python, you can go check this link:

https://askubuntu.com/questions/443048/python-2-7-6-on-ubuntu-12-04-操作方法

然后您可以按照以下步骤开始安装Django和设置数据库:

Then you can start install Django and setup database as follow:

sudo apt-get install python-django
sudo apt-get install mysql-server
sudo apt-get install python-mysqldb

您可以在此链接中找到更多配置详细信息

You can find more configuration detail in this link

http://yuwenqing.org/?p=108

此外,为了减轻以后的开发负担,您应该在python virtualEnv中部署Django应用程序,以下是一些为什么需要virtualEnv的详细信息.

Also, for less pain in future develop, you should deploy your Django application in python virtualEnv, here are some detail of why you need virtualEnv.

http://yuwenqing.org/?p=126

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

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