美文网首页
Ubuntu_16.04 安装 Pyhon3.6

Ubuntu_16.04 安装 Pyhon3.6

作者: moon_light_ | 来源:发表于2020-04-08 00:40 被阅读0次

Ubuntu 16.04 默认装的是 Python3.5
  
方式一:
  sudo add-apt-repository ppa:jonathonf/python-3.6
  sudo apt-get update
  sudo apt-get install python3.6
  
方式二:  
  wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
  tar xf Python-3.6.5.tar.xz
  cd Python-3.6.5
  ./configure --enable-optimizations
  
  sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
        libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
        libncursesw5-dev xz-utils tk-dev
  
  make && make install
  sudo make altinstall
  
改变链接  
  sudo rm /usr/bin/python3
  ln -s /usr/local/bin/python3.6 /usr/bin/python3
  
试了方式一装不了,方式二可以装,但改了链接后系统有些功能或程序会因为 Python 版本不对用不了
  
  


相关文章

网友评论

      本文标题:Ubuntu_16.04 安装 Pyhon3.6

      本文链接:https://www.haomeiwen.com/subject/mfhuuhtx.html