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

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Security Latest
Security Latest
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
V
V2EX
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tenable Blog
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
Lohrmann on Cybersecurity
F
Full Disclosure
H
Help Net Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
O
OpenAI News
S
Securelist

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