title: How to set default python3 to python 3.9 instead of python 3.8 in Ubuntu 20.04 LTS
body: <p>I have installed Python 3.9 in the Ubuntu 20.04 LTS. Now the system has both Python 3.8 and Python 3.9.</p>
  <pre><code># which python
  # which python3
  /usr/bin/python3
  # which python3.8
  /usr/bin/python3.8
  # which python3.9
  /usr/bin/python3.9
  # ls -alith /usr/bin/python3
  12583916 lrwxrwxrwx 1 root root 9 Jul 19  2021 /usr/bin/python3 -&gt; python3.8
  </code></pre>
  <p>But the <code>pip3</code> command will still install everything into the Python 3.8 directory.</p>
  <pre><code># pip3 install --upgrade --find-links file:///path/to/directory &lt;...&gt;
  </code></pre>
  <p>I want to change that default pip3 behavior by updating the symbolic link /usr/bin/python3 to /usr/bin/python3.9.</p>
  <p>How to do that?</p>
  <pre><code># update-alternatives --set python3 /usr/bin/python3.9
  This command will not work as expected.
  </code></pre>
  <p><strong>Here is the pip3 info:</strong></p>
  <pre><code># which pip3
  /usr/bin/pip3
  # ls -alith /usr/bin/pip3
  12589712 -rwxr-xr-x 1 root root 367 Jul 13  2021 /usr/bin/pip3
  # pip3 -V
  pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
  # 
  </code></pre>
  <p>The <code>alias</code> command will not work:</p>
  <pre><code># alias python3=python3.9
  # ls -alith /usr/bin/python3
  12583916 lrwxrwxrwx 1 root root 9 Jul 19  2021 /usr/bin/python3 -&gt; python3.8
  </code></pre>