with Python 3 on Windows 10, you have to enter the command in Powershell as following :
py -m pip install pyautogui