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

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AWS News Blog
AWS News Blog
V
Vulnerabilities – Threatpost
D
Darknet – Hacking Tools, Hacker News & Cyber Security
量子位
博客园 - 叶小钗
AI
AI
T
Tor Project blog
Forbes - Security
Forbes - Security
W
WeLiveSecurity
博客园_首页
爱范儿
爱范儿
J
Java Code Geeks
B
Blog
G
GRAHAM CLULEY
aimingoo的专栏
aimingoo的专栏
Cloudbric
Cloudbric
C
CXSECURITY Database RSS Feed - CXSecurity.com
TaoSecurity Blog
TaoSecurity Blog
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
H
Help Net Security
博客园 - 三生石上(FineUI控件)
C
Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Palo Alto Networks Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园 - 司徒正美
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
S
Secure Thoughts
Spread Privacy
Spread Privacy
F
Fortinet All Blogs
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
About on SuperTechFans
Security Latest
Security Latest
Webroot Blog
Webroot Blog
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog

崎径 其镜

Unity CVE-2025-59489 漏洞修复实践(Google Play 合规) 从零配置 VS Code C++ 环境 力扣笔记 一文详解Hexo 博客搭建 Unity 游戏的 Google Play 16 kb页面对齐处理 Unity 升级到 2022 踩坑记录(URP / 黑屏 / HTTP) Android Google Play 16 KB 页面对齐适配指南 iOS 应用开启包外存储访问(文件共享) xlua学习笔记 Lua新知 EFK日志分析系统的搭建 使用贝塞尔曲线实现道具随机飞动效果 震惊,JS不加分号会造成错误!? Github图床工具 JS使用replace()函数全部替换 JS使用Splice()函数操作数组 当你的程序连接Mysql然后崩溃时 安卓应用闪屏 安卓各渠道SDK接入体验 某微信爬虫工具多开方案 U3D问题总结(七) lua U3D问题总结(六) 优化 U3D问题总结(五) 渲染与光照 U3D问题总结(四) 物理相关 U3D问题总结(三) Unity基础
Linux升级Python
Anqi Zhao · 2019-11-28 · via 崎径 其镜

11月底,腾讯云搞了一波双11返场活动,我买了三年的服务器。

和买了新的电脑或者做了新系统一样,得先把生产环境搞好。

距离Python2.x停止维护大概只有5个月了吧,所以第一要务是升级Python的版本。但是yum是依赖Python2的,所以升级还是会有一些顾虑的。下面是升级的过程:

下载、解压

wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
tar -zxvf Python-3.8.0.tgz

安装编译环境

yum install make build-essential libssl-dev zlib1g-dev libbz2-dev
yum install zlib

编译、安装

yum install -y make build-essential libssl-dev zlib1g-dev libbz2-dev
yum -y install zlib

cd Python-3.8.0
./configure
make && make install

备份与配置

mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/bin/python3 /usr/bin/python

保证yum可用

将下面文件中的配置修改为Python2.x版本的路径。

/usr/bin/yum
/usr/libexec/urlgrabber-ext-down

安装pip

pip需要依赖setuptools,所以要先安装setuptools。

wget https://files.pythonhosted.org/packages/ce/1d/96320b9784b04943c924a9f1c6fa49124a1542039ce098a5f9a369227bad/setuptools-42.0.1.zip
unzip setuptools-42.0.1.zip
cd setuptools-42.0.1
python setup.py build
python setup.py install

wget https://files.pythonhosted.org/packages/ce/ea/9b445176a65ae4ba22dce1d93e4b5fe182f953df71a145f557cffaffc1bf/pip-19.3.1.tar.gz
tar -zxvf pip-19.3.1.tar.gz
cd pip-19.3.1
python setup.py build
python setup.py install

参考资料

https://www.cnblogs.com/zhangym/p/6226435.html
https://www.cnblogs.com/fjping0606/p/9156344.html
https://www.cnblogs.com/fyly/p/11112169.html

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 崎径 其镜

赞助

  • 微信

    微信

  • 支付宝

    支付宝