I would like to upgrade a package each time the script is started. The solution proposed here:
pip.main(['install', '--upgrade', package]).
Is causing on Python 3.8.10 the following error message:
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.
How can I fix this?