001-python basics-python installation and upgrade, 001-python
1. Install Python in windows 1.1 download Python 1.2 installation (including Python2 and Python3) 1.3 about pip
For pip introduction, similar to the earlier version of Python in yum, pip may need to be installed separately. Now Python comes with pip, and pip does not need to be installed separately.
1.4 configure Environment Variables
Right-click the computer and choose Properties> advanced system Settings> advanced environment variables> Path in the second content box. one row, double-click the installation directory of Python and append it to the variable value. Separate the values with commas (,). For example, the original value and C: \ python27 are separated by semicolons.
Ii. Install python in linux
No installation required. original Python environment. ps: Update to 2.6 if it comes with 2.7
3. Upgrade python in windows
Uninstall and reinstall.
4. Update python in linux
Linux's yum dependency comes with Python. To prevent errors, the update here is actually to install another Python.
1 check the default Python version 2 python-V 3 4 1. install gcc to compile Python source code 5 yum install gcc 6 2. Download the source code package, https://www.python.org/ftp/python/ 7 3, extract and enter the source code file 8 4, compile and install 9. /configure10 make all11 make install12 5. View version 13/usr/local/bin/python2.7-V14 6. Modify the default Python version 15 mv/usr/bin/python/usr/bin/ python2.616 ln-s/usr/local/bin/python2.7/usr/bin/python17 7. Prevent yum execution exceptions, modify Python version 18 vi/usr/bin/yum19 of yum to set the header #! /Usr/bin/python #! /Usr/bin/python2.6