Centos6.7+python+flask Development Framework Deployment

Source: Internet
Author: User
Tags virtualenv

System environment: The base service version of CentOS6.7.

Package available: Official download

Package version:

Readline-devel:yum Installation

OpenSSL and Openssl-devel:yum installation

Python:python-2.7.6.tar.xz

Ipython:ipython-1.2.1.tar.gz

Setuptools:setuptools-20.3.1.tar.gz

Pip:pip-8.1.1.tar.gz

Virtualenv:virtualenv-15.0.1.tar.gz

Werkzeug wsgi:werkzeug-0.11.5.tar.gz

Jinja2:jinja2-2.8.tar.gz

Flask:flask-0.10.1.tar.gz

1. Install Python and Ipython

Dependent Packages:

Readline-devel this is a dependency package that ipython the input and output highlighting.

The two packages of OpenSSL and Openssl-devel are the dependencies behind the installation of Setuptools.

Installation:

Python Package----go into the unpacked directory--execute./configure--prefix=/usr/local/python27 (Specify Installation path)--Execute make && make Install compile Installation--

Execute ln-sv/usr/local/python27/bin/python2.7/usr/bin/python to create Python's path--and execute the python command to check Python and version-->finish.

Ipython Package--unzip--into the unpacked directory--Execute Python setup.py build--Execute Python setup.py install----Execute Ln-sv/usr/lo Cal/python27/bin/ipython/usr/bin/ipython--

Execute the ipython command to check if the Ipython is installed successfully--Finish.

Attention:

Yum relies on older versions of Python, and if older versions of Python are overwritten or deleted, Yum will not be able to use it.

Workaround: Modify the first line of the/usr/bin/yum file to #!/usr/bin/python2.6


2. Install the Python management tool Setuptools

Download Setuptools-----Execute Python setup.py install--and Finish.

See if the Python installation directory in the bin directory is later Easy_install, if there is an indication that the Setuptools installation was successful.

3. Install Pip

Download the PIP Package----Perform python pip install--and Finish.

4. Installing and configuring VIRTUALENV

Purpose: The purpose of installing virtualenv is to avoid confusion in multiple projects by avoiding the use of multiple development frameworks.

Install: Download the VIRTUALENV Package-----Perform Python setup.py install--and Finish.

Configuration: Execute virtualenv name to create the virtual directory--go into the bin directory of the virtual directory--and perform the source bin/activate activation virtualenv--and Finish.

Note: The name of the virtual directory is displayed before the command line when VIRTUALENV is activated.

5. Installing the Flask Frame

First install flask's two dependent components Werkzeug WSGI Toolbox and JINJA2 template engine, installed by: Unzip the package--Execute Python setup.py install--and Finish.

Download the Flask Package--unzip--execute Python setup.py install--and Finish.

6.python+flask installation deployment is complete.


If you want to install the Flask Development Framework for Eclipse under Windows, see: http://blog.csdn.net/jiqimiao/article/details/9393345


This article is from "Jessen Liu's blog," Please make sure to keep this source http://zkhylt.blog.51cto.com/3638719/1755158

Centos6.7+python+flask Development Framework Deployment

Related Article

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.