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

推荐订阅源

W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Security @ Cisco Blogs
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
腾讯CDC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
F
Full Disclosure
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Threatpost
I
Intezer
V2EX - 技术
V2EX - 技术
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
小众软件
小众软件
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
N
News | PayPal Newsroom
MyScale Blog
MyScale Blog
AI
AI
Vercel News
Vercel News
Spread Privacy
Spread Privacy
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
Help Net Security
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
L
LINUX DO - 热门话题
U
Unit 42
L
LangChain Blog
Recent Announcements
Recent Announcements

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个机房按小时计费,支持支付宝,【点击查看】。