给centos再安装一个python3.9
标签搜索
侧边栏壁纸
  • 累计撰写 25 篇文章
  • 累计收到 31 条评论

给centos再安装一个python3.9

z
z
2023-09-14 / 1 评论 / 85 阅读 / 正在检测是否收录...
# 0 安装支持库
sudo dnf install -y gcc openssl-devel bzip2-devel libffi-devel zlib-devel readline-devel sqlite-devel

# 1.下载python3.9源码
cd ~
mkdir py3.9 && cd py3.9
wget https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz

# 2.解压
tar -xv Python-3.9.10.tgz 
cd Python-3.9.10/

# 3.配置安装路径
./configure --prefix=/usr/local/python3.9

# 4.安装
make && make install

# # 5.配置环境变量-/usr/local/bin本来就有
# vi ~/.bashrc
# export PATH="/usr/local/bin:$PATH"
# source ~/.bashrc 

# 添加软连接 /usr/local/python3.9/bin/python3.9创建软连接到/usr/local/bin
ln -s /usr/local/python3.9/bin/python3.9 /usr/local/bin/python3.9
ln -s /usr/local/python3.9/bin/pip3.9 /usr/local/pip3.9

完成,互不冲突
python3.9和pip3.9

0

评论 (1)

取消
  1. 头像
    6
    Windows 10 · Google Chrome

    666

    回复