2019-10-29 Install python3.8 in ubuntu19
Updated at 2020-04-02
# Install required packages
# 安装依赖包(也可跳过这一步,直接安装python, make时如果报错再来安装这些依赖)
sudo echo 'Changing apt sources to huawei mirrors...'&&git clone https://github.com/waketzheng/carstino&&sudo ./carstino/change_ubuntu_mirror_sources.py # 换华为镜像源
sudo apt update
sudo apt install -y build-essential checkinstall
sudo apt install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev tk-dev zlib1g-dev
sudo apt install -y libsqlite3-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev libssl-dev
# end: install required packages
# Or run in one line: sudo apt update&&sudo apt install -y build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev tk-dev zlib1g-dev libsqlite3-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev libssl-dev
mkdir ~/softwares && cd ~/softwares
wget https://mirrors.huaweicloud.com/python/3.8.2/Python-3.8.2.tar.xz
tar xf Python-3.8.2.tar.xz
cd Python-3.8.2
./configure --enable-optimizations
sudo make altinstall
python3.8 -V
pip3.8 -V
网友评论