Centos安装Python3(自带pip和setuptools)

安装zlib相关依赖

解决zipimport.ZipImportError: can’t decompress data和pip3 ssl证书问题

sudo yum -y install zlib*
sudo yum install openssl-devel

找到Python3下载链接

  • 进入官网

  • 选择对应版本
    Centos安装Python3(自带pip和setuptools)

  • 选一个你喜欢的Python3版本, 建议3.4以后(这里我选择3.6)

Centos安装Python3(自带pip和setuptools)

  • 选择压缩包
    Centos安装Python3(自带pip和setuptools)

  • 右键赋值链接地址

比如这里是https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz

下载

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

解压

tar xvf Python-3.6.5.tar.xz

Centos安装Python3(自带pip和setuptools)

进入目录编译

  • configure
sudo ./configure

Centos安装Python3(自带pip和setuptools)

  • make
sudo make

Centos安装Python3(自带pip和setuptools)

  • install
sudo make install

Centos安装Python3(自带pip和setuptools)

  • 安装完成

Centos安装Python3(自带pip和setuptools)

上一篇:Parsing error: x-invalid-end-tag vue/no-parsing-error的问题解决方法


下一篇:关于Mybatis-plus中性能插件失效问题