1

When i type in python 3.6.5 shell:

import pip
pip install pyautogui

it returns this:

>>> pip install pyautogui   
SyntaxError: invalid syntax

in cmd it returns this:

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

if i dont import pip it says this:

Python 3.6.5 shell

>>> pip install pyautogui
SyntaxError: invalid syntax

cmd (with python on path)

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

So what do i need to do?

'install' is no command of pip. What? everyone says yeah write pip install pyautogui. tadaaa.

Edit------------------------------------------------------------ It worked when i put pip in my path and then run the command. (In cmd of course)

1
  • Is pip in your PATH? Commented Jul 4, 2018 at 19:58

1 Answer 1

2

pip should be used in shell command prompt, not in python prompt

Open the cmd.exe program from your windows and type the commands there.

The pip.exe is not in the same folder as python - it is installed in the Scripts subfolder so you have to navigate to that folder or add it to the PATH too.

C:\> CD \Python36\Scripts
C:\Python36\Scripts> pip install pyautogui

Or wherever your python is installed

Sign up to request clarification or add additional context in comments.

3 Comments

I tried to use cmd.exe in windows but it didn't work but i could try the other thing
It will work i think, thanks
How do you make pip a path?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.