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!!!!