Install a python library in python virtual environment venv: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified

Error: When running pip install in venv, on Windows 10, the following error is displayed:

WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'C:\Python311\Scripts\google-oauthlib-tool.exe' -> 'C:\Python311\Scripts\google-oauthlib-tool.exe.deleteme'

Solution: run

py -m pip install [the package you want to install]

Script cannot be loaded because running scripts is disabled on this system. For moreinformation, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.

Error: when running the activation script for my python virtual environment, the I had the following error on Win10

Activate.ps1 cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.

Solution: Open a powershell as admin and run the following command

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

hit Y and press the Enter key.