Install Python3.5.6 detailed documentation on Linux!!!!

Source: Internet
Author: User
Tags install django

In Linux
Install Python3.5.6 detailed documentation!!!

1. Install dependent Libraries (toolkit)
Yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline- Devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel-y
2. Download the source code for PYTHON3 (enter the command under Linux terminal)
Switch/OPT Directory
Cd/opt
#下载python3.5.6 Source Code
wget https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tgz
#python源码的. (It's all here.)
https://www.python.org/ftp/python/
3. Extracting source code
TAR-XF python-3.5.6.tgz
(Appears Python-3.5.6)
4. Switch the python3.5 source directory
CD Python-3.5.6
5. Generate a compilation script (specify the installation directory)
./configure--prefix=/opt/python35
6. Compiling
Make
7. Compile and install after successful compilation
Make install
8. Switch the python3.5 directory that is already installed
cd/opt/python35/
9. View the executable script file for python3.5
[[email protected] python35]# ls bin/
10. Execute python3.5 Interpreter
1. Absolute path Execution mode one
/opt/python35/bin/python3.5
2. Relative path execution mode two
[Email protected] python35]# bin/python3.5
3. Add Environment variables
1. Adding a soft connection (usage)
Ln-s original file path destination file path
2. Add a soft connection
(absolute path) ln-s/opt/python35/bin/python3.5/usr/local/bin/python3
4. Add PIP3 Soft Connection
Ln-s/OPT/PYTHON35/BIN/PIP3/USR/LOCAL/BIN/PIP3

5. View PIP3 Version
Pip3-v
Pip 10.0.1 From/opt/python35/lib/python3.5/site-packages/pip (Python 3.5)




Tip
python3.5 Soft Connection:
Ln-s/opt/python35/bin/python3.5/usr/local/bin/python3.5

To delete a python3.5 soft connection:
Rm-rf/usr/local/bin/python3
Installing Django
1. Installing Django Mode 1
PIP3 Install django==1.11
Mode 2:
python3-m pip Install-i https://pypi.tuna.tsinghua.edu.cn/simple django==1.11

Uninstalling Django
PIP3 Uninstall Django

Update Pip Tool
PIP3 Install--upgrade pip
2. After installing the django1.11, configure the soft connection
Ln-s/opt/python35/bin/django-admin/usr/local/bin/django-admin

3. Start the Django
VI settings.py
Write allowed_hosts = [' * ']
Start Django
python3.5 manage.py Runserver 0.0.0.0:8000

4.windows access to linux IP address + port
x.x.x.x:8000


Code upload and run
1.windows Write code
Modify the appropriate configuration file
2. Test bug!!!!
3. Transferring to the server via XFTP
4. Start the project

Install Python3.5.6 detailed documentation on Linux!!!!

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.