centos安装python3.8 pip
# 删除旧的
卸载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
上一篇: 控制台测试ajax
下一篇: 在古代猪肉贵不贵?猪在古代的地位怎么样?
推荐阅读