【Linux】Ubuntu16 安装python3.8

  • Ubuntu16默认安装了python2.7和python3.5,不要删除。
  • 安装新版本python命令如下:
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget

wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
tar -xf Python-3.8.0.tar.xz
cd Python-3.8.0
./configure prefix=/usr/local/python3
make
sudo make altinstall
sudo rm /usr/bin/python
sudo ln -s /usr/local/python3/bin/python3.8 /usr/bin/python
  • 1914 x 862

你可能感兴趣的:(Linux,ubuntu,python,linux)