title: How to fix -- bash: /usr/bin/python: Too many levels of symbolic links
body: <p>I wanted to make python3 my default on rhel so I followed the following at <a href="https://stackoverflow.com/questions/45542690/how-to-set-python3-5-2-as-default-python-version-on-centos">How to set Python3.5.2 as default Python version on CentOS?</a></p>
  
  <pre><code>sudo ln -fs /usr/bin/python3 /usr/bin/python
  </code></pre>
  
  <p>It changed the default to <code>3.6.8</code></p>
  
  <pre><code>root@rhel:~# python -V
  Python 3.6.8
  </code></pre>
  
  <p>Then I tried yum install python-pip:</p>
  
  <pre><code>root@rhel:~# yum install python-pip
    File "/usr/bin/yum", line 30
      except KeyboardInterrupt, e:
                          ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>This happened when I tried a few other commands.  I tried reverting the changes by</p>
  
  <pre><code>root@rhel:~# sudo ln -fs /usr/bin/python /usr/bin/python
  </code></pre>
  
  <p>But am running into </p>
  
  <pre><code>root@rhel:~# python -V
  bash: /usr/bin/python: Too many levels of symbolic links
  </code></pre>
  
  <p>I guess from what Im reading in places I need to break the sym links. The following is whats in my /usr/bin/</p>
  
  <p><a href="https://i.stack.imgur.com/FrWVT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FrWVT.png" alt="enter image description here"></a></p>
  
  <p>ls -l /usr/bin | grep python</p>
  
  <pre><code>lrwxrwxrwx    1 root root          15 Oct 21 14:12 python -&gt; /usr/bin/python
  lrwxrwxrwx    1 root root          14 Aug  8 05:53 python-config -&gt; python2-config
  lrwxrwxrwx    1 root root           9 Aug  8 05:51 python2 -&gt; python2.7
  lrwxrwxrwx    1 root root          16 Aug  8 05:53 python2-config -&gt; python2.7-config
  -rwxr-xr-x    1 root root        7144 Jun 11 10:34 python2.7
  -rwxr-xr-x    1 root root        1835 Jun 11 10:34 python2.7-config
  lrwxrwxrwx    1 root root           9 Aug  8 05:51 python3 -&gt; python3.6
  lrwxrwxrwx    1 root root          16 Aug  8 05:53 python3-config -&gt; python3.6-config
  lrwxrwxrwx    1 root root          20 Aug  8 05:53 python3-debug -&gt; /usr/bin/python3.6dm
  -rwxr-xr-x    2 root root       11336 Jun 11 15:17 python3.6
  lrwxrwxrwx    1 root root          17 Aug  8 05:53 python3.6-config -&gt; python3.6m-config
  -rwxr-xr-x    1 root root       11336 Jun 11 15:17 python3.6dm
  -rwxr-xr-x    1 root root         175 Jun 11 15:16 python3.6dm-config
  -rwxr-xr-x    1 root root        3396 Jun 11 14:54 python3.6dm-x86_64-config
  -rwxr-xr-x    2 root root       11336 Jun 11 15:17 python3.6m
  -rwxr-xr-x    1 root root         173 Jun 11 15:16 python3.6m-config
  -rwxr-xr-x    1 root root        3403 Jun 11 14:54 python3.6m-x86_64-config
  </code></pre>