- 从 Python 官网下载源码包
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz - 安装 Python 依赖的第三方包
yum install openssl-devel libxslt-devel -y - 解压缩源码包然后编译安装。
./configure --prefix=/usr/python3.5make && make install - 将 Python3添加到系统环境中
vi ~/.bash_profileexport PATH=$PATH:/usr/python3.5/bin - 使环境变量生效
source ~/.bash_profile - 验证安装成功状态
python3
© 著作权归作者所有
文章评论(0)