How to install Django in Ubuntu 11.10

前端 未结 3 1435
伪装坚强ぢ
伪装坚强ぢ 2021-01-15 06:36

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

s         


        
相关标签:
3条回答
  • 2021-01-15 07:08

    Install

    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-how-to

    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

    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

    0 讨论(0)
  • 2021-01-15 07:12

    Install pip

    To install or upgrade pip, securely download get-pip.py.

    Then run the following (which may require administrator access):

    sudo python get-pip.py
    

    If setuptools (or distribute) is not already installed, get-pip.py will install setuptools for you.

    To upgrade an existing setuptools (or distribute), run pip install -U setuptools

    Upgrade pip

    On Linux or OS X:

    sudo pip install -U pip
    

    Then you can download django using pip,

    sudo pip install django
    
    0 讨论(0)
  • 2021-01-15 07:27

    First update repositories

    sudo apt-get update
    

    then try

    sudo apt-get install python-pip python-dev build-essential python-setuptools
    

    if nothing, you can install pip and setuptools packages manually. Download them from PyPI.

    0 讨论(0)
提交回复
热议问题