Can't Get Started Unable to Use PIP or Anything Else

2,684 views
Skip to first unread message

Joe Gancher

unread,
Feb 1, 2020, 10:02:29 PM2/1/20
to beautifulsoup
Sorry for such an elementary topic but, I have to learn this and was brought to a screeching halt on step 1. I do have access to Idle for Python and I have installed Python via the Command Prompt. When I try to do any PIP, Install or easy_install BS4 or requests.... I get syntax errors or other errors.... Here's some examples:
Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 01:54:44) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> pip install requests
SyntaxError: invalid syntax
SyntaxError: invalid syntax
>>> pip
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    pip
NameError: name 'pip' is not defined
>>> pip3 install requests
SyntaxError: invalid syntax
>>> easy_install beautifulsoup4
SyntaxError: invalid syntax
>>> 

or ....

  File "<stdin>", line 1
    pip install requests
              ^
SyntaxError: invalid syntax
  File "<stdin>", line 1
    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
             ^
SyntaxError: invalid syntax
  File "<stdin>", line 1
    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
             ^
SyntaxError: invalid syntax
  File "<stdin>", line 1
    curl http://bootstrap.pypa.io/get-pip.py -o get-pip.py
            ^
SyntaxError: invalid syntax
>>> pip3 install requests
  File "<stdin>", line 1
    pip3 install requests
               ^
SyntaxError: invalid syntax
>>> easy_install beautifulsoup4
  File "<stdin>", line 1
    easy_install beautifulsoup4
                              ^
SyntaxError: invalid syntax
>>>

or...
>>> python --version
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    python --version
NameError: name 'python' is not defined
>>> pip install requests
SyntaxError: invalid syntax
>>> 
=============================== RESTART: Shell ===============================
>>> pip install requesta
SyntaxError: invalid syntax
>>> pip install requests
SyntaxError: invalid syntax
>>> easy_install beautifulsoup4
SyntaxError: invalid syntax
>>> pip3 install requests
SyntaxError: invalid syntax
>>> 

Obviously I am doing something very fundamentally wrong in my setup. Your help is appreciated.

leonardr

unread,
Feb 1, 2020, 10:05:59 PM2/1/20
to beautifulsoup
Joe,

You're running these commands from within Python. Commands like "pip", "easy_install", "curl", etc. are intended to be run from the same command prompt you used to install Python. Hopefully pip was installed alongside Python and you can install packages from there.

Leonard
Reply all
Reply to author
Forward
0 new messages