linux服务器升级python(python2和python3共存)先安装sqlite-devel, 1yum -y install sqlite-devel 123456mkdir /usr/local/python3cd /usr/local/wget https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tar.xztar -xvJf Python-3.10.4.tar.xzcd Python-3.10.4./configure prefix=/usr/local/python3 在Python-3.10.4目录下执行下面的命令(下载pip等插件的命令)下载和编译安装 1make && make install 建立软连接 12ln -fs /usr/local/python3/bin/python3 /usr/bin/python3ln -fs /usr/local/python3/bin/pip3 /usr/bin/pip3 linux下更新pip 123pip install --upgrade pippip3 install --upgrade pipsudo pip3 install --upgrade pip