在Linux下编译Python

  1. wegt xxxPython-3.6.10.tgz 网址
    2.解压 tar -zvxf Python-3.6.10.tgz
    3.下载依赖
    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
    4.编译
    ./configure --prefix=/home/admin/app/python3
    5.安装
    make && make install
    6.写入环境变量
    export PATH=/home/admin/app/python3:$PATH

参考:https://www.cnblogs.com/kimyeee/p/7250560.html

你可能感兴趣的:(在Linux下编译Python)