Python Learning Path (3)--python installation and environment variable operation

Source: Internet
Author: User

Install Python

Windows:

1234567 1、下载安装包    https://www.python.org/downloads/2、安装    默认安装路径:C:\python273、配置环境变量    【右键计算机】--》【属性】--》【高级系统设置】--》【高级】--》【环境变量】--》【在第二个内容框中找到 变量名为Path 的一行,双击】 --> 【Python安装目录追加到变值值中,用 ; 分割】    如:原来的值;C:\python27,切记前面有分号

Linux:

123 无需安装,原装Python环境 ps:如果自带2.6,请更新至2.7

Update python

Windows:

1 卸载重装即可

Linux:

Linux Yum relies on its own python, to prevent errors, the update here is actually to install a python

12345678910111213141516171819 查看默认Python版本python -V 1、安装gcc,用于编译Python源码    yum install gcc2、下载源码包,https://www.python.org/ftp/python/3、解压并进入源码文件4、编译安装    ./configure    make all    make install5、查看版本    /usr/local/bin/python2.7 -V6、修改默认Python版本    mv /usr/bin/python /usr/bin/python2.6    ln -s /usr/local/bin/python2.7 /usr/bin/python7、防止yum执行异常,修改yum使用的Python版本    vi /usr/bin/yum    将头部 #!/usr/bin/python 修改为 #!/usr/bin/python2.6

Python Learning Path (3)--python installation and environment variable operation

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.