Linux系统删除centos7中自带有python2.7以及安装Python3.7

/ Python / 0 条评论 / 851浏览

删除centos7中自带有python2.7

(1)强制删除已安装python及其关联
 rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps
(2)删除残余文件
 whereis python|xargs rm -frv
  • 1
  • 2
  • 3
  • 4

Linux系统上安装Python3.7

https://www.cnblogs.com/qingyuanyuanxi/p/7985626.html

下载源码包 进入官网https://www.python.org/ 找到第一个Downloads下载 Source code是源码

  • 1
  • 2
  • 3
  • 4

在这里插入图片描述
在这里插入图片描述

python3: 
/usr/local/bin/python3.7m 
/usr/local/bin/python3.7 
/usr/local/bin/python3.7m-config 
/usr/local/bin/python3 
/usr/local/bin/python3.7-config 
/usr/local/lib/python3.7 
/usr/local/python3.7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
                                </div>
            <link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-60ecaf1f42.css" rel="stylesheet">
                                            <div class="more-toolbox">
            <div class="left-toolbox">
                <ul class="toolbox-list">
                    
                    <li class="tool-item tool-active is-like "><a href="javascript:;"><svg class="icon" aria-hidden="true">
                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#csdnc-thumbsup"></use>
                    </svg><span class="name">点赞</span>
                    <span class="count"></span>
                    </a></li>
                    <li class="tool-item tool-active is-collection "><a href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;popu_824&quot;}"><svg class="icon" aria-hidden="true">
                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-csdnc-Collection-G"></use>
                    </svg><span class="name">收藏</span></a></li>
                    <li class="tool-item tool-active is-share"><a href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;1582594662_002&quot;}"><svg class="icon" aria-hidden="true">
                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-csdnc-fenxiang"></use>
                    </svg>分享</a></li>
                    <!--打赏开始-->
                                            <!--打赏结束-->
                                            <li class="tool-item tool-more">
                        <a>
                        <svg t="1575545411852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5717" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M179.176 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5718"></path><path d="M509.684 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5719"></path><path d="M846.175 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5720"></path></svg>
                        </a>
                        <ul class="more-box">
                            <li class="item"><a class="article-report">文章举报</a></li>
                        </ul>
                    </li>
                                        </ul>
            </div>
                        </div>
        <div class="person-messagebox">
            <div class="left-message"><a href="https://blog.csdn.net/zzlzy1989">
                <img src="https://profile.csdnimg.cn/5/4/1/3_zzlzy1989" class="avatar_pic" username="zzlzy1989">
                                        <img src="https://g.csdnimg.cn/static/user-reg-year/2x/9.png" class="user-years">
                                </a></div>
            <div class="middle-message">
                                    <div class="title"><span class="tit"><a href="https://blog.csdn.net/zzlzy1989" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;}" target="_blank">蓝天下的风</a></span>
                                        </div>
                <div class="text"><span>发布了51 篇原创文章</span> · <span>获赞 46</span> · <span>访问量 1万+</span></div>
            </div>
                            <div class="right-message">
                                        <a href="https://im.csdn.net/im/main.html?userName=zzlzy1989" target="_blank" class="btn btn-sm btn-red-hollow bt-button personal-letter">私信
                    </a>
                                                        <a class="btn btn-sm  bt-button personal-watch" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;}">关注</a>
                                </div>
                        </div>
                </div>
</article>