欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

centos安装python3.8 pip

程序员文章站 2022-05-25 09:57:05
800 yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel 801 yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel ......

# 删除旧的

卸载pyhton3
rpm -qa|grep python3|xargs rpm -ev --allmatches --nodeps       
 
删除所有残余文件
whereis python3 |xargs rm -frv           
 
查看现有安装的python
whereis   python       

#安装python3.8

安装依赖

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel -y
800  yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel -y
  801  yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel -y
  802  yum install wget -y
  803  yum install libffi-devel -y 
  804  yum install software-properties-common -y

源码安装
  806  mkdir download
  812  tar zxvf Python-3.8.1.tgz 
  814  cd Python-3.8.1
  819  mkdir -p /usr/local/python3
  831  ./configure --prefix=/usr/local/python3
  832  make -j4 && make install -j4

  834  python3 -V
  835  # sudo ln -s /usr/local/python3/bin/python3 /usr/bin/python3
  836  python3 -V
  837  ln -s /usr/local/python3/bin/python3 /usr/bin/python3
  838  python3 -V
# 安装pip
  843  tar -zxvf pip-9.0.1.tar.gz 
  844  cd pip-9.0.1/
  845  python3 setup.py install
  846  #  sudo ln -s /usr/local/python3/bin/pip /usr/bin/pip3
  847  ln -s /usr/local/python3/bin/pip /usr/bin/pip3
  848  pip3 -V
  849  pip3 install requests
  850  pip3 install --upgrade pip3
  851  pip3 install --upgrade pip
  852  pip3 install python3-venv
 

本文地址:https://blog.csdn.net/yuezhilangniao/article/details/107465718

相关标签: python相关 flask