• Linux 安装 Python3.6.5


    1. 安装依赖环境

    yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

    2. 下载 Python 3.6.5

    wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz

    3. 创建安装目录

    mkdir -p /usr/local/python3

    4. 解压文件

    tar -zxvf Python-3.6.5.tgz

    5. 编译安装

    cd Python-3.6.5
    
    ./configure --prefix=/usr/local/python3
    
    make
    
    make install

    6. 建立Python3 的软连接

    ln -s /usr/local/python3/bin/python3 /usr/bin/python3

    7. 并将/usr/local/python3/bin加入PATH

    vim ~/.bash_profile

    修改以下代码:

    PATH=$PATH:$HOME/bin:/usr/local/python3/bin

    使用以下命令,使修改生效:

    source ~/.bash_profile

    8. 检查是否安装完成

    python3

    出现以下代码表示安装完成:

    [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    风吹散的仅仅是回忆
  • 相关阅读:
    javascript基础
    html基础
    css基础
    django-session和cookie
    rest架构
    django-models
    django-templates
    Alignment
    ural 1225.Flags
    ural 1009. K-based Numbers
  • 原文地址:https://www.cnblogs.com/weige007/p/12098777.html
Copyright © 2020-2023  润新知