To avoid this problem you can invoke Python with '-m pip' instead of running pip directly code example
Example: WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
python -m pip install --upgrade --force-reinstall pip