Try:
py -m pip install --upgrade package_name
See the duplicate Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: [duplicate] - Stack Overflow.