08
2020
05

centos7系统默认Python2与Python3共存方案

下载Python3包:

wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz



安装依赖:

yum -y install zlib-devel libffi-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make


解压,编译,安装:

tar -xvzf Python-3.8.3.tgz

cd Python-3.8.3
./configure --prefix=/usr/local/python3
make

make install

添加Python3环境变量:

vi /etc/profile

在以下位置添加:

PATH=$PATH:/usr/local/python3/bin

保存退出,执行:source /etc/profile

python3 -V

python -V

image.png


这里不建议把系统默认Python2版本替换为Python3,所有基于Python2的组件会异常,虽然可以修改配置文件,但你得一个个去修改,比较麻烦

« 上一篇 下一篇 »

评论列表:

强力推荐https://www.scyhdzc.com/
强力推荐https://www.scyhdzc.com/
大神崇拜很久了https://www.scyhdzc.com/
文章非常不错https://www.scyhdzc.com/
文章非常不错https://www.scyhdzc.com/
臻泰芒分享http://www.ztm88.com.cn/post/2409.html
臻泰芒分享http://www.ztm88.com.cn/post/2409.html
8.访客  2024-07-03 16:18:45 回复该评论
最近压力山大啊!http://www.keyandrawing.com
最大的瓜在这里。https://11yule.com/156.html
最大的瓜在这里。https://11yule.com/156.html
评论深刻妙不可测http://www.lygruntian.com/jr/kaiyejiri/5258.html
评论深刻妙不可测http://www.lygruntian.com/jr/kaiyejiri/5258.html
雷锋大人~https://www.bbs6666.com/tags-8.html
雷锋大人~https://www.bbs6666.com/tags-8.html
雷锋大人~https://www.bbs6666.com/tags-8.html
大神崇拜很久了https://www.scyhdzc.com/
大神崇拜很久了https://www.scyhdzc.com/
大神崇拜很久了https://www.scyhdzc.com/
大神崇拜很久了https://www.scyhdzc.com/
强力推荐https://www.gaofeick.com/
强力推荐https://www.gaofeick.com/
强力推荐https://www.gaofeick.com/
大神崇拜很久了https://www.gaofeick.com/
大神崇拜很久了https://www.gaofeick.com/
大神崇拜很久了https://www.gaofeick.com/
大神崇拜很久了https://www.gaofeick.com/
大神崇拜很久了https://www.gaofeick.com/
有没有喜欢吃瓜的https://www.rrtt88.cn
有没有喜欢吃瓜的https://www.rrtt88.cn
有没有喜欢吃瓜的https://www.rrtt88.cn
有没有喜欢吃瓜的https://11yule.com/222.html
有没有喜欢吃瓜的https://11yule.com/222.html
有没有喜欢吃瓜的https://11yule.com/222.html
吃瓜呀来看看https://11yule.com
吃瓜呀来看看https://11yule.com
一起来吃瓜瓜https://www.uuu9923.cn/505.html
一起来吃瓜瓜https://www.uuu9923.cn/505.html
一起来吃瓜瓜https://www.uuu9923.cn/505.html
这个文章写的挺好。https://www.scyhdzc.com/
这个文章写的挺好。https://www.scyhdzc.com/
这个文章写的挺好。https://www.scyhdzc.com/
有没有喜欢吃瓜的https://www.rrtt88.cn/%e5%90%83%e7%93%9c%e7%bd%91/%e5%90%83%e7%93%9c%e7%be%a4%e4%bc%97
有没有喜欢吃瓜的https://www.rrtt88.cn/%e5%90%83%e7%93%9c%e7%bd%91/%e5%90%83%e7%93%9c%e7%be%a4%e4%bc%97
喜欢吃瓜的进来。https://11yule.com/161.html
45.游客  2024-07-07 01:49:35 回复该评论
缺乏激情了!http://lqbh5.sophmoon.cn
46.游客  2024-07-07 02:44:15 回复该评论
楼主写的很经典!http://xj278e.06gk.cn
47.游客  2024-07-07 03:05:24 回复该评论
论坛的人气不行了!http://wmw.lm75.cn
48.游客  2024-07-07 07:54:08 回复该评论
求加金币!http://gxtc.69ey2.cn
49.游客  2024-07-07 10:00:33 回复该评论
这个帖子好无聊啊!http://1woh4.kblewwq.cn
大神崇拜很久了https://www.gaofeick.com/
大神崇拜很久了https://www.gaofeick.com/
这个文章写的挺好。https://www.gaofeick.com/
这个文章写的挺好。https://www.gaofeick.com/
54.游客  2024-07-08 06:28:41 回复该评论
楼主的帖子越来越有深度了!http://rshikm.zhijian.me
有没有喜欢吃瓜的https://www.rrtt88.cn/%e5%90%83%e7%93%9c%e7%bd%91
有没有喜欢吃瓜的https://www.rrtt88.cn/%e5%90%83%e7%93%9c%e7%bd%91
喜欢吃瓜的进来。https://11yule.com/159.html
喜欢吃瓜的进来。https://11yule.com/159.html
59.游客  2024-07-08 14:17:14 回复该评论
看了这么多帖子,第一次看看到这么有内涵的!http://1iebq.zhonghuayan.net
一起来吃瓜瓜https://www.uuu9923.cn/302.html
一起来吃瓜瓜https://www.uuu9923.cn/302.html
一起来吃瓜瓜https://www.uuu9923.cn/302.html
63.游客  2024-07-08 15:09:13 回复该评论
看帖、回帖、拿分、走人http://13n0.mabaozhong.com
64.游客  2024-07-08 21:27:32 回复该评论
白富美?高富帅?http://9opp.haoshiman.com
65.游客  2024-07-08 21:46:23 回复该评论
一口气看完了,我要下去回味回味了!http://ya2.mabaozhong.com
66.游客  2024-07-08 23:02:47 回复该评论
管它三七二十一!http://sl0.jun-shun.com
67.游客  2024-07-08 23:05:17 回复该评论
收藏了,以后可能会用到!http://mbgp.zhijian.me
68.游客  2024-07-09 00:57:30 回复该评论
顶!顶!顶!http://www.ddman.net
69.游客  2024-07-09 01:03:25 回复该评论
看帖回帖一条路!http://3wpf.jun-shun.com
70.游客  2024-07-09 03:00:53 回复该评论
楼主加油,看好你哦!http://6gcq.jun-shun.com
71.游客  2024-07-09 03:48:12 回复该评论
大神好强大!http://e5l34.hp315.com/20240709/3.html
72.游客  2024-07-09 04:03:11 回复该评论
世界末日我都挺过去了,看到楼主我才知道为什么上帝留我到现在!http://c6ho1.lsptf.com
73.游客  2024-07-09 04:49:02 回复该评论
支持一下!http://pptzg.flavortwirl.com
74.游客  2024-07-09 05:13:50 回复该评论
精华帖的节奏啊!http://s78j5.6685668.com
75.游客  2024-07-09 05:21:04 回复该评论
缺乏激情了!http://zv38uy.flavortwirl.com
踩一下,欢迎回访https://www.clhww.com
踩一下,欢迎回访https://www.clhww.com
文章真不错,赞了,欢迎回访下谢谢!http://www.13xd.cn
文章真不错,赞了,欢迎回访下谢谢!http://www.13xd.cn
80.游客  2024-07-09 08:47:06 回复该评论
楼主说的我也略懂!http://mud.scopeprobe.com.cn
81.游客  2024-07-09 08:49:27 回复该评论
顶顶更健康!http://gox.51kqn.cn
82.游客  2024-07-09 09:14:04 回复该评论
支持一下,下面的保持队形!http://n56u7.scopeprobe.com.cn
83.游客  2024-07-09 09:16:23 回复该评论
这么经典的话只有楼主能想到!http://23q2mk.51kqn.cn
84.游客  2024-07-09 10:20:16 回复该评论
读了楼主的帖子,顿时马桶就通了。。。http://ta2lmq.rys6.com
85.游客  2024-07-09 10:30:05 回复该评论
支持一下!http://36a.51kqn.cn
86.游客  2024-07-09 13:24:41 回复该评论
这里的资源非常丰富,帮助我解决了很多问题。http://bi8d8.jzsocialvip.com/2024/3.html
87.游客  2024-07-09 19:09:44 回复该评论
这么好的帖子,应该加精华!http://l63685.6685668.com
88.游客  2024-07-09 20:02:24 回复该评论
大神就是大神,这么经典!http://8jlds2.ledjty.com
89.游客  2024-07-09 22:34:11 回复该评论
语言表达流畅,没有冗余,读起来很舒服。http://03d.sh-jingmei.cn
90.游客  2024-07-10 00:03:03 回复该评论
这个帖子会火的,鉴定完毕!http://x9oli.ledjty.com
91.游客  2024-07-10 02:53:24 回复该评论
吹牛的人越来越多了!http://xq4pn.gomarsco.com
92.游客  2024-07-10 04:24:27 回复该评论
禽兽不如应该不是说楼主的的吧?http://65u2.millesimevoyagesdz.com
93.游客  2024-07-10 05:44:16 回复该评论
视死如归的架势啊!http://44f264.gy-designs.com
94.游客  2024-07-10 05:57:04 回复该评论
支持一下,下面的保持队形!http://tzqpe.gy-designs.com
95.游客  2024-07-10 16:03:52 回复该评论
世界末日我都挺过去了,看到楼主我才知道为什么上帝留我到现在!http://dv4bm.xzpsmf.cn
96.游客  2024-07-10 19:07:09 回复该评论
今天上网不回帖,回帖就回精华帖!http://r40fft.foda-china.cn
97.游客  2024-07-10 19:43:49 回复该评论
我只看看不说话。。。http://4q9q.xrlche.com
98.游客  2024-07-10 21:55:19 回复该评论
经典!http://gol.cffghq.cn
99.游客  2024-07-11 00:18:57 回复该评论
楼主的头像能辟邪啊!http://wy6.51egoods.com
100.游客  2024-07-11 00:41:46 回复该评论
顶一个!http://kmert8.dk61.cn

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Top