Install Python3 and Django under Linux

Source: Internet
Author: User

My operating system is centos6.5

1 First choose what database Django will use. django1.10 default database is Sqlite3, I want to use MySQL database, but in order to test convenient by the way to install the SQLite development package.

Yum install mysql  mysql-devel
#为了测试方便, we need to install the Sqlite-devel package
Yum Install sqlite-

2 Next we need to install Python, because Python3 has become the mainstream, so next we will install Python3, to the official website to download the new version of Python3. I downloaded the version for python3.5.2

wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz

3 Unzip and install

#  Unzip the tar package tar XF python-3.5. 2 . tgz #  into the unpacked package CD Python-3.5. 2 #  Configure the installation information, my installation path is /usr/install/python3/. /configure--prefix=/usr/install/python3/#  compile and install  make make Install

4 Configuring the PATH environment variable

#  Create a new file Python3 under the/ect/profile.d/file. SH  /etc/profile.d/python3.sh#  Add the following words export PATH= $PATH:/usr/Install/python3/bin/ #然后执行export PATH= $PATH:/usr/Install/python3/bin/

5 By default, Python3.5.2 has Pip installed, but I want to install a newer version of PIP

# download PIP installer wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py#  Install Pippython3 get-pip.py

6 Installing Django

Install Django

7 Installing the Mysqlclient,mysqlclient is a Python3 with MySQL connector.

Install mysqlclient

Complete!

Install Python3 and Django under Linux

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.