1.创建操作系统用户:
useradd -d /home/teststub -s /bin/csh -m teststub
2.修改密码:passwd teststub Huawei @123
3.将Python-3.8.3.tgz文件拷贝到 teststub用户下;
4.解压安装包:tar -zxvf Python-3.8.3.tgz
5.创建安装目录:sudo mkdir /usr/local/python3 进入解压后目录: Python-3.8.3
6.配置安装的目录: ./configure --prefix=/usr/local/python3
7.开始编译python3.8.3代码,并安装:sudo make install
8.建立软连接运行的名称:
sudo ln -s /usr/local/python3/bin/python3.8 /usr/local/bin/python38
sudo ln -s /usr/local/python3/bin/pip3.8 /usr/bin/pip3
9.检查是否安装成功:python3
10.建立idle记成开发环境的连接:
sudo In -s /usr/local/python3/idle3.8 /usr/local/bin/idle3.8
退出编译环境:quit()