xxxxxxxxxx
python -m pip install -U pip --user //In Windows
pip install -U pip --user //Linux, and MacOS
xxxxxxxxxx
manually open folder properties uncheck read-only attribute box at the bottom
Your anti-virus might be blocking the execution of pip/pip3 in your terminal and then marking your folder/file as read-only. In your anti-virus software, exclude pip/pip3 from the harmful processes list