侧边栏壁纸
  • 累计撰写 26 篇文章
  • 累计创建 25 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Centos Python3安装

iRay
2022-10-17 / 0 评论 / 0 点赞 / 625 阅读 / 2715 字

安装python3 需要的依赖

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 libffi-devel wget gcc gcc-c++ automake autoconf libtool make

官网下载对应版本

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

解压下载的包

tar -zxf Python-3.8.12.tgz

配置、编译、安装

  • cd Python-3.8.12
  • ./configure --with-ssl --prefix=/opt/soft/python3.8.12
  • make
  • make install

设置链接,校验

  • cd /usr/bin
  • ln -s /opt/soft/python3.8.12/bin/python3.8 python3
  • ln -s /opt/soft/python3.8.12/bin/pip3 pip3
  • pip3 -V
  • python3 -V

设置pip国内源

更新pip

python3 -m pip install --upgrade pip

0

评论区