曲釜霆 發表於 2020-9-1 09:39:00

CentOS 卸载 python

<p><strong>卸载 python 2.7</strong></p>
<p><code>rpm -qa|grep python2|xargs rpm -ev --allmatches --nodeps</code></p>
<p><code>whereis python2 |xargs rm -frv</code></p>
<p>-------------------</p>
<pre class="hljs vim mCustomScrollbar _mCS_11 mCS-autoHide mCS_no_scrollbar"><strong>卸载 </strong><span class="hljs-keyword"><strong>python3</strong>
rpm -<span class="hljs-keyword">qa|<span class="hljs-keyword">grep <span class="hljs-keyword">python3|xargs rpm -ev --allmatches --nodeps       卸载pyhton3
whereis <span class="hljs-keyword">python3 |xargs rm -frv         删除所有残余文件
成功卸载!
whereis   <span class="hljs-keyword">python       查看现有安装的<span class="hljs-keyword">python
</span></span></span></span></span></span></span></pre>
<p>&nbsp;-------------------</p>
<pre class="hljs vim mCustomScrollbar _mCS_11 mCS-autoHide mCS_no_scrollbar">The system python on <strong>CentOS 7</strong>&nbsp;must be the <strong>2.7</strong> version that we ship. Must. <br>You cannot replace the system python with a different one. <br>If you need a newer python then multiple places ship a python3 stack that installs in parallel to the system 2.7 that we ship. <br>No-one yet ships 3.8 as it's too new. There are python 3.6 packages in the <strong>CentOS 7.7</strong> base and updates repos. <br>Use those. <br>They are supported and are the same versions that are in <strong>CentOS 8</strong> so you know things written on one should work on the other.<br><br>&nbsp;-------------------</pre>
<p><span class="bjh-p">Centos <strong>7.8</strong></span></p>
<p><span class="bjh-p"><strong>Python 3</strong> is now available. Installing the python3 package gives you the Python 3.6 interpreter。Python 3 可用,安装python3将会提供Python 3.6解释器。</span></p>
<p><span class="bjh-p">---------------------------------</span></p>
<p><strong><span class="bjh-p"><span class="bjh-p">Centos 8</span></span></strong></p>
<pre class="hljs vim mCustomScrollbar _mCS_11 mCS-autoHide mCS_no_scrollbar"><code>Python 3.6</code>&nbsp;是默认的 Python 环境,有限支持 Python 2.7<br><br><span class="bjh-p">---------------------------------</span><br><br><br><br></pre><br><br>
来源:https://www.cnblogs.com/emanlee/p/13594389.html
頁: [1]
查看完整版本: CentOS 卸载 python