Python 3.7.0 is the newest major release of the Python language, and it contains many new features and optimizations.
简介
以官方centos镜像为基础,安装Python3.7.0。
更换yum源
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
安装wget
yum install wget
下载
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
安装
-
解压
tar -xvf Python-3.7.0.tgz
-
移动
mv Python-3.7.0 /usr/local
-
执行
./configure
configure: error: no acceptable C compiler found in $PATH
yum install gcc
./configure
-
编译
yum install make
make
-
安装
make install
zipimport.ZipImportError: can't decompress data; zlib not available
yum install zlib* -y
ModuleNotFoundError: No module named '_ctypes'
yum install libffi-devel -y
make install
-
建立软连接
ln -s /usr/local/Python-3.7.0/python /usr/bin/python3
-
验证
保存镜像
参考
Centos7- wget未找到命令,there are no enabled repos 解决办法
作者:Wuxinshui
出处:http://wuxinshui.github.io
版权归作者所有,转载请注明出处