惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LINUX DO - 热门话题
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
Docker
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
T
Tenable Blog
P
Privacy International News Feed
Google DeepMind News
Google DeepMind News
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
The Hacker News
The Hacker News
Project Zero
Project Zero
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
Jina AI
Jina AI
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Scott Helme
Scott Helme
A
About on SuperTechFans
WordPress大学
WordPress大学
F
Fortinet All Blogs
大猫的无限游戏
大猫的无限游戏
G
GRAHAM CLULEY
Latest news
Latest news
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
Schneier on Security

Rat's Blog - Python

Linux VPS使用Python/Caddy快速搭建文件分享平台 - Rat's Blog Python 3.6一键安装脚本 for CentOS/Debian - Rat's Blog Linux VPS出现 “-bash: python: command not found”错误的解决方法 Linux CentOS 6升级Python 2.6至Python 2.7的方法
Linux CentOS升级Python 3.6版本方法 - Rat's Blog
博主: Rat's · 2017-06-30 · via Rat's Blog - Python

说明:现在很多软件安装也要求Python 3以上,而PythonCentOS 6默认是2.6版本,CentOS 72.7版本,所以我们需要手动升级Python版本来达到软件编译的最低要求。

方法

这里以CentOS 6为例。
1、安装环境

yum -y groupinstall development zlib zlib-devel

2、下载并安装python3.6

wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
tar xJf Python-3.6.0.tar.xz
cd Python-3.6.0
./configure
make
make install

注意:如果因为系统原因make install时出现zipimport.ZipImportError: can't decompress data错误,请先执行 yum -y install zlib*后再安装。

3、检查是否成功

which python3
python3 -V

请输入图片描述
4、创建软链接

cd /usr/bin
mv python python.backup
ln -s /usr/local/bin/python3 /usr/bin/python

5、重启,查看当前的python版本

python -V

请输入图片描述
看到Python 3.6就说明安装成功了!


版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/196/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。

Vultr新用户注册送100美元/16个机房按小时计费,支持支付宝,【点击查看】。