centos7一键安装python3
cd /optwget http://npm.taobao.org/mirrors/python/3.7.9/Python-3.7.9.tgztar -xzf Python-3.7.9.tgzcd Python-3.7.9./configure --prefix=/opt/pythonmake && make installcat << EOF >> /et
·
cd /opt
wget http://npm.taobao.org/mirrors/python/3.7.9/Python-3.7.9.tgz
tar -xzf Python-3.7.9.tgz
cd Python-3.7.9
./configure --prefix=/opt/python
make && make install
cat << EOF >> /etc/profile
# python
export PYTHON=/opt/python/bin
export PATH=\$PATH:\$PYTHON
EOF
source /etc/profile
# 升级pip
pip3 install --upgrade pip
# 查看已安装的包
pip3 freeze
pip3 list
# 检查哪些包需要更新
pip3 list outdated
更多推荐
已为社区贡献5条内容
所有评论(0)