Python-django Environment Construction

Source: Internet
Author: User
Tags install django

In one case, Python version uses version 3.5, usually Linux comes with Python at around 2.6, so 3.5 environments have to compile and install Python themselves.

Part I: Installing python3.5

001, solve the dependency problem

Yum Install GCC gcc-c++ libffi libffi-devel zlib zlib-devel OpenSSL openssl-devel libyaml sqlite-devel

Python-devel, GCC, gcc-c++ are some of the dependencies that are needed to compile and install python3.5

Libffi libffi-devel zlib zlib-devel OpenSSL openssl-devel libyaml sqlite-devel These are the dependencies that are used when installing other Python tools here I install them at once.

002, from the official download python3.5 source package, copy to Linux, and unzip

003. Compile and install python3.5

CD python-3.5. 1/. /configure--prefix=/usr/local/python3. 5  Make  Make Install

Part II: Installation of some common tools

001, compile and install setuptools This tool is used to install other software, it is a bit like Linux in the Yum,python there is a tool similar to setuptools work

It is pip,pip in setuptools behind the appearance of my personal feeling pip than setuptools to use, that for Mao I want to install setuptools here? One of the Python modules does not support PIP

Installation, so I've got two of them all installed here. Compile and install or the old routine.

Note that it is clear that python3.5 will not install the module into the Linux default Python.

Path=/usr/local/python3. 5/bin/: ${path}cd setuptools-21.0. 0/python3. 5 setup.py build && python3. 5 Install

002. Install PIP with Setuptools

Note that it is also important to point out that easy_install-3.5 is still installed in the default Python version of Linux.

easy_install-3.5 pip

003. Install Django with PIP

PIP3. 5 Install Django

Part III: Creating a Django Project

001. Create a project

cd/tmp/Django-admin startproject mywebsitecd mywebsite/python3. 5 0.0. 0.0: &

Comments:

1. Enter the/tmp directory

2. Create a new project mywebsite with django-admin command; You can see a mywebsite folder in the/tmp/directory when you're done.

3. Enter the Mywebsite directory

4. Run the 2nd step to create the Web project

002. Whether the test project can be accessed normally

The page that appears above shows that the Django project that you just created has successfully run.

 

Python-django Environment Construction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.