First, Install Python
Windows:
1. Download python2.7 installation package HTTPS://WWW.PYTHON.ORG/DOWNLOAD/RELEASES/2.7/2, install default installation path: C:\python273, configure environment variable "right-click Computer"-"attribute"-"high Level system Settings "-" Advanced "-" Environment variable "-" in the second content box to find the variable named path of a row, double-click "-" Python installation directory appended to the variable value, use; split "such as: the original value; C:\python27, remember that there is a semicolon in front 1, download python3.5.2 installation package HTTPS://WWW.PYTHON.ORG/DOWNLOADS/RELEASE/PYTHON-352/2, install the default installation path: C:\User S\administrator\appdata\local\programs\python\python35 Install, select "ADD pytone 3.5 tp PATH" to automatically append the Python installation target to the variable note: python2.7 and python3.5 can be installed together in Windows
Linux:
No installation, original Python environment PS: If you bring your own 2.6, please update to 2.7
----------------------------------------------------------------------------------------
Second, update python
Windows:
Unloading load can be
Linux:
View the default Python version [[email protected] ~]# Python-vpython 2.6.6 1, install gcc for compiling python source yum install gcc2, download the source package, 3, unzip and enter the source file 4, compile Install the./configure make install5, view version/usr/local/bin/python2.7-v6, modify the default Python version mv/usr/bin/python/us r/bin/python2.6 ln-s/usr/local/bin/python2.7/usr/bin/python7, prevents Yum from performing exceptions, modifies the Python version used by Yum Vi/usr/bin/yum the header #! /usr/bin/python modified to #!/usr/bin/python2.6
This article is from the "Mr.xiong's OPS log" blog, so be sure to keep this source http://mrxiong2017.blog.51cto.com/12559394/1899169
Python Environment installation and upgrade