title: Upgrade package from script using pip on Python Version > 3.8.10
body: <p>I would like to upgrade a package each time the script is started. The solution proposed <a href="https://stackoverflow.com/questions/38302028/upgrade-package-from-script-using-pip/38302134#38302134">here</a>:</p>
  <pre><code>pip.main(['install', '--upgrade', package]).
  </code></pre>
  <p>Is causing on Python 3.8.10 the following error message:</p>
  <pre><code>WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
  Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
  To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
  </code></pre>
  <p>How can I fix this?</p>