乌班图安装python_优麒麟/Ubuntu安装Python3

  • Post author:
  • Post category:python


虚拟环境:

Python:Python3.7.3(Python-3.7.3.tgz)

系统源为阿里源:http://mirrors.aliyun.com/ubuntu

一、下载软件

官网下载:https://www.python.org/downloads/

选择 Linux/UNIX

13ba7f055085e6-1024x521.jpg

进入后选择自己需要的版本,点击:Gzipped source tarball下载Python。

1d9bb365a2ace0-1024x373.jpg

二、安装Python3.7

解压Python-3.7.3.tgz,命令:

tar -xf Python-3.7.3.tgz

进入解压后的文件夹Python-3.7.3:

cd Python-3.7.3

安装系统依赖

sudo apt-get install zlib1g-dev libbz2-dev libssl-dev libncurses5-dev default-libmysqlclient-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev liblzma-dev libffi-dev libc6-dev