Linux安装python

  1. 作者QQ:67065435 QQ群:821635552

  2. 本站内容全部为作者原创,转载请注明出处!

  3. 安装前的准备

    yum install gcc-c++ make -y
    
  4. 安装Python-3.6.12

    wget https://www.python.org/ftp/python/3.6.12/Python-3.6.12.tgz
    tar -zxvf Python-3.6.12.tgz
    cd Python-3.6.12
    ./configure --prefix=/usr/local/python
    make
    make install
    
  5. 修改目录权限

    useradd www
    chown -R www:www /usr/local/python
    
  6. 为新安装的python设置软连接到环境变量可及的目录

    ln -s /usr/local/python/bin/python3 /usr/bin/python3
    
  7. 测试升级是否成功

    python3 -V
    python3 --version
    
Copyright © 豆包嘿嘿~ 2012-∞ 冀ICP备17033181号 all right reserved,powered by Gitbook修订: 2020-09-07 16:05:33

results matching ""

    No results matching ""