Python-web Development Environment Construction

Source: Internet
Author: User

First, install distribute or setuptools, I use the Distribute

Download Link: Https://pypi.python.org/pypi/distribute

[Email protected] opt]# TAR-ZXVF distribute-0.6.49.tar.gz [[email protected] opt]# CD Distribute-0.6.49[[email protecte D] distribute-0.6.49]# python setup.py install

Second, installation JINJA2

: HTTPS://PYPI.PYTHON.ORG/PYPI/JINJA2

[Email protected] opt]# TAR-ZXVF jinja2-2.9.6.tar.gz [[email protected] opt]# CD Jinja2-2.9.6[[email protected] opt]# py Thon setup.py Install

Third, install the MySQL 5.x database and MySQL python driver Mysql-connector-python:

[Email protected] opt]# yum-y install mysql* Mysql-connector-python

IV. Structure of the project

Select a working directory to create the following directory structure:

awesome-python-webapp/   <--root directory |+-backup/               <--backup directory |+-conf/<--                 configuration file |+-dist/<--                 Package Directory |+- www/                  <--web directory, storing. py File |  | |  +-static/            <--store static files |  | |  +-templates/         <--store template file |+-LICENSE               <--code LICENSE

Once you've created your project's directory structure, it's recommended that you set up a git repository and sync to GitHub to keep your code changes safe.

Python-web Development 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.