码迷,mamicode.com
首页 > 编程语言 > 详细

CentOS7.7安装python3.8.2与pip20

时间:2020-02-28 13:50:29      阅读:524      评论:0      收藏:0      [点我收藏+]

标签:pre   编译安装   安装包   ica   tst   测试   libffi   python3   adl   

1.安装第三方库

#  yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
 
#  yum install libffi-devel -y

2.下载与安装python3

#  建立新目录
#  sudo mkdir /usr/local/python3 
 
# 下载安装包
#  wget --no-check-certificate https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz
 
#  解压安装包
#  tar xzvf Python-3.8.2.tgz
 
#  cd Python-3.8.2
 
#  编译安装
#  sudo ./configure --prefix=/usr/local/python3
#  sudo make 
#  sudo make install

3、修改系统的默认Python编译器

#  删除默认Python软连接
#  rm /usr/bin/python       

#  创建软链接                               
# sudo ln -s /usr/local/python3/bin/python3 /usr/bin/python

4.验证python安装

#  python -V

5.安装pip

#  /usr/bin/python -m pip install --upgrade pip

# 或者下载安装脚本 # curl https:
//bootstrap.pypa.io/get-pip.py -o get-pip.py # 执行安装脚本 # python get-pip.py

6、测试安装

# pip -V

 

CentOS7.7安装python3.8.2与pip20

标签:pre   编译安装   安装包   ica   tst   测试   libffi   python3   adl   

原文地址:https://www.cnblogs.com/Laro/p/12376625.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!