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

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
Spread Privacy
Spread Privacy
I
InfoQ
V
V2EX
S
Schneier on Security
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
C
Cybersecurity and Infrastructure Security Agency CISA
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Latest news
Latest news
S
Secure Thoughts
Project Zero
Project Zero
MongoDB | Blog
MongoDB | Blog
I
Intezer
Security Latest
Security Latest
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
N
Netflix TechBlog - Medium
V2EX - 技术
V2EX - 技术
量子位
T
Threatpost
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
T
Tor Project blog
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
L
LINUX DO - 热门话题

Rat's Blog - Python

Linux VPS使用Python/Caddy快速搭建文件分享平台 - Rat's Blog Linux VPS出现 “-bash: python: command not found”错误的解决方法 Linux CentOS升级Python 3.6版本方法 - Rat's Blog Linux CentOS 6升级Python 2.6至Python 2.7的方法
Python 3.6一键安装脚本 for CentOS/Debian - Rat's Blog
博主: Rat's · 2018-02-08 · via Rat's Blog - Python
  •  发布时间:
  •  55463 次浏览
  •   17 条评论
  •  792 字数
  • 分类: 主机教程
  1.  首页
  2. 正文  
  3. 分享到:

说明:最近一直在玩爬虫,需要使用到python3pip3,手动安装又有点麻烦,就搞了个一键脚本,Python版本为3.6.4,脚本安装了很多依赖包,不会因为缺少依赖而出问题,这里就分享下。

安装

1、检查下系统是否有Python3

python3 -V

2、安装Python3

#CentOS系统
wget https://www.moerats.com/usr/shell/Python3/CentOS_Python3.6.sh && sh CentOS_Python3.6.sh
#Debian系统
wget https://www.moerats.com/usr/shell/Python3/Debian_Python3.6.sh && sh Debian_Python3.6.sh

然后再输入python3 -V看是否安装成功。一般安装成功就可以使用python3pip3了。

提示

如果想修改系统默认的Python版本的话,还需要创建软链接,可使用命令:

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

然后重启运行python -V查看即可。

一般CenOS系统修改后会出现yum用不了的情况,这时候需要编辑yum的配置文件,方法如下:

vi /usr/bin/yum
将文件首行
#!usr/bin/python
修改为python之前的版本,如:
#!/usr/bin/python2.7

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

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

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

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