Python Environment and installation

Source: Internet
Author: User

Windows


1、下载安装包

     https: / / www.python.org / downloads /

2 、安装

     默认安装路径:C:\python27

3 、配置环境变量

     【右键计算机】 - - 》【属性】 - - 》【高级系统设置】 - - 》【高级】 - - 》【环境变量】 - - 》【在第二个内容框中找到 变量名为Path 的一行,双击】  - - > 【Python安装目录追加到变值值中,用 ; 分割】

     如:原配置;C:\python27,切记前面有分号 LinuxLinux preinstalled python2.x versions, if required Python3.   x version, directly installed, Source installation specific operation is as follows:
查看默认Python版本 python  - V   1 、安装gcc,用于编译Python源码      yum install gcc 2 、下载源码包,https: / / www.python.org / ftp / python / 3 、解压并进入源码文件 4 、编译安装      . / configure      make  all      make install 5 、查看版本      / usr / local / bin / python2. 7 - V 6 、修改默认Python版本      mv  / usr / bin / python  / usr / bin / python2. 6      ln  - / usr / local / bin / python2. 7 / usr / bin / python 7 、防止yum执行异常,修改yum使用的Python版本      vi  / usr / bin / yum      将头部  #!/usr/bin/python 修改为 #!/usr/bin/python2.6

Python Environment and installation

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.