How to install PyAutoGui on python3 64 bit on Windows 10?

Darth Vador picture Darth Vador · Apr 29, 2017 · Viewed 22.4k times · Source

I've tried:

pip install pyautogui

#output:

  File "<stdin>", line 1
pip install pyautogui
          ^
SyntaxError: invalid syntax

I've tried

C:\Python34\pip.exe install pyautogui

#output:

  File "<stdin>", line 1
C:\Python34\pip.exe install pyautogui
                                    ^
SyntaxError: unexpected character after line continuation character

None of these are working. Again, I'm on Windows 10, I have python 3, and python is 64 bit not 32 bit.

Answer

tpvasconcelos picture tpvasconcelos · Apr 29, 2017

The pip you are trying to use is not a python package or built-in function. pip is instead a package management system for Python. The python3 distribution should already come with pip pre-installed.

Use the pip command on the command-line. Running pip -h will give you a quick discription of which commands you can use. See the image bellow:

enter image description here

If you can replicate the image above in your command-line, it means you already have pip installed and can go ahead and run $ pip install pyautogui.

If instead you get something like:

-bash: pip: command not found

it means you need to install pip first.