You are running pip install within python, you need to run it in the terminal. i.e. when you see >>> type exit() and press enter, then use pip install [your package]
>>>
pip install [your package]