Ubuntu上手动安装Python3.7.5,输入以下命令
#下载python3.7.5文件并解压,这里是从python官网下载
wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz
tar -zvxf Python-3.7.5.tgz
cd Python-3.7.5
#configure时报错no acceptable C compiler found, 缺失C语言编译器,先安装gcc
sudo apt install -y gcc
#开始configure,这里有configure,make 及make install的介绍 https://blog.csdn.net/vivian187/article/details/51750639
./configure
#干净的Ubuntu系统不识别make,需要安装build-essential
sudo apt install -y build-essential
此时输入make,会有一堆模块缺失,和其他错误
需要安装一些libraries,只剩下_dbm模块缺失,对后面使用python3和pip3没影响
#模块缺失,可以查找python解压后的setup.py文件,里面能找到缺失模块和对应名字,然后再百度搜索安装时的名字。这里只需要安装-dev版,即开发版本。
#Could not locate ffi libs and/or headers,安装 libffi-dev
#找不到_bz