zoukankan      html  css  js  c++  java
  • Linux 源码编译Python 3.6

    Linux 源码编译Python 3.6

    1.操作系统以及版本显示

    # uname -sr

    Linux 3.10.0-514.el7.x86_64

    # uname -sr

    Linux 3.10.0-514.el7.x86_64

    2.下载python安装包

    # wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz

    3.开始进行编译安装python

      3.1 解压python

    # tar -xf Python-3.6.1.tar.xz

      3.2 获取帮助

    # cd Python-3.6.1/

    # cat README.rst

      3.3 查看编译的参数

    # ./configure --help

      3.4 开始编译

    # yuminstall -y gccgcc-c++

    # ./configure --prefix=/usr/local/python-3.6

    # make && makeinstall

      3.5 测试

    [root@localhost Python-3.6.1]# /usr/local/python-3.6/bin/python3.6

    Python 3.6.1 (default, May 102017, 08:59:54)

    [GCC 4.8.520150623 (Red Hat4.8.5-11)] on linux

    Type "help", "copyright", "credits" or "license"formore information.

    >>>

    4.出现的错误以及解决办法

    在进行make install 的时候出现了以下信息,安装被终止

    zipimport.ZipImportError: can't decompress data; zlib not available

    解决办法:

    # yuminstall -y zlib zlib-devel

    Linux安装Python 3.5.2 http://www.linuxidc.com/Linux/2017-10/147579.htm

    Ubuntu 16.04下安装Vim8并支持Python3 http://www.linuxidc.com/Linux/2017-09/147108.htm

    Python之装饰器、迭代器和生成器 http://www.linuxidc.com/Linux/2017-07/145883.htm

    深入浅出理解Python 装饰器 http://www.linuxidc.com/Linux/2017-08/146312.htm

    Python编程:从入门到实践 超清晰PDF完整版+源代码 http://www.linuxidc.com/Linux/2017-06/145208.htm

    本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-10/147891.htm

  • 相关阅读:
    165. Compare Version Numbers
    164. Maximum Gap
    3、桶排序
    162. Find Peak Element
    160. Intersection of Two Linked Lists
    155. Min Stack
    154. Find Minimum in Rotated Sorted Array II
    153. Find Minimum in Rotated Sorted Array
    Linux/Unix系统编程手册 第二章:基本概念
    Linux/Unix系统编程手册 第一章:历史和标准
  • 原文地址:https://www.cnblogs.com/yangshunde/p/7775019.html
Copyright © 2011-2022 走看看