python3.10安装

wget https://www.python.org/ftp/python/3.10.9/Python-3.10.9.tgz

cd /usr/local/

mkdir -pv python310

tar  -zxvf  Python-3.10.9.tgz

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 libffi-devel gcc make

./configure --prefix=/usr/local/python310

make

make install

vi /etc/profile

export PATH=/usr/local/python310/bin:$PATH

source  /etc/porile

[root@k8-node bin]# python3 --version
Python 3.10.9
[root@k8-node bin]# pip3 --version
pip 22.3.1 from /usr/local/python310/lib/python3.10/site-packages/pip (python 3.10)

pip指定国内的源

 pip install python-gitlab -i  http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

  pip3 install python-gitlab -i  http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

  pip3 install --upgrade pip

你可能感兴趣的:(python3.10安装)