001-python basics-python installation and upgrade, 001-python

Source: Internet
Author: User

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

 

 

 

 

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.