子钦加油

扩大
缩小

Centos7安装python3和pip3(一)

安装相关依赖

1
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

开始安装

复制代码
# 下载解压
cd /opt
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz tar -xvf Python-3.6.8.tgz mv Python-3.6.8 python-3.6.8# 在local目录下创建python3目录 mkdir /opt/python3 # 配置安装目录 cd /opt/python-3.6.8 ./configure --prefix=/opt/python3 # 编译安装 make && make install # 配置python3软连接 ln -s /opt/python3/bin/python3 /usr/bin/python3 # 配置pip3软连接 ln -s /opt/python3/bin/pip3 /usr/bin/pip3 # 升级pip pip3 install --upgrade pip
复制代码
# 查看已安装的包
pip3 freeze
pip3 list
# 检查哪些包需要更新
pip3 list outdated

posted on 2019-10-20 21:19  子钦加油  阅读(441)  评论(0编辑  收藏  举报

导航

返回顶部