• Install Python3.6 on Amazon Linux/EC2 在Amazon Linux实例中安装使用Python3.6


    本文转载自 https://gist.github.com/niranjv/f80fc1f488afc49845e2ff3d5df7f83b

    由于Amazon Linux中预装的Python版本为2.7,该脚本教程很好地解决了在Amazon Linux中安装Python3.6的需求,遂转发记录至此

    # install pre-requisites
    sudo yum -y groupinstall development
    sudo yum -y install zlib-devel
    sudo yum -y install openssl-devel
    
    # Installing openssl-devel alone seems to result in SSL errors in pip (see https://medium.com/@moreless/pip-complains-there-is-no-ssl-support-in-python-edbdce548852)
    # Need to install OpenSSL also to avoid these errors
    
    sudo wget https://github.com/openssl/openssl/archive/OpenSSL_1_0_2l.tar.gz
    sudo tar -zxvf OpenSSL_1_0_2l.tar.gz 
    cd openssl-OpenSSL_1_0_2l/
    sudo ./config shared
    sudo make
    sudo make install
    export LD_LIBRARY_PATH=/usr/local/ssl/lib/
    cd ..
    sudo rm OpenSSL_1_0_2l.tar.gz
    sudo rm -rf openssl-OpenSSL_1_0_2l/
    
    # Install Python 3.6
    sudo wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
    sudo tar xJf Python-3.6.0.tar.xz
    cd Python-3.6.0
    
    sudo ./configure
    sudo make
    sudo make install
    
    cd ..
    sudo rm Python-3.6.0.tar.xz
    sudo rm -rf Python-3.6.0
    
    # Create virtualenv running Python 3.6
    sudo pip install --upgrade virtualenv
    virtualenv -p python3 MYVENV  #到有权限的目录下 我是到家目录下
    source MYVENV/bin/activate
    
    python --version
    # Python 3.6.0
  • 相关阅读:
    Date日期对象
    JAVA适配器
    java 对象的多态性
    简单轮播
    ecshop 教程地址
    瀑布流js排列
    phpcms 搜索结果页面栏目不显示解决 方法
    手机自动跳转
    字串符转换数字、取小数点后两位数的方法
    js 判断鼠标进去方向
  • 原文地址:https://www.cnblogs.com/jackzz/p/10862668.html
Copyright © 2020-2023  润新知