# 1. 查看python是否安装
python -V
# 2. 查看python指令解析流程
which python # 看到python位置 cd /usr/bin ls -al python* # 查看python相关指令
# 1. 下载Python3.6.6 cd /usr/local wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz
# 2. 解压 tar -zxvf Python-3.6.6.tgz # 3. 进入解压目录,编译
cd /usr/local/Python-3.6.6
./configure --prefix=/usr/local/python3 # 编译时会检查安装个包是否可用,且指定安装目录 # 4. 安装 cd /usr/local/Python-3.6.6 make make install # 5. 建立python3 指令软连接 ln -s /usr/local/python3/bin/python3.6 /usr/bin/python3 # 6. 测试python是否可用 python3 -V #7. 建立pip3 软连接 ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip3 # 8.测试 pip3 -V pip3 list # 9. 更新pip3指令
pip3 install --upgrade pip