I am trying to install BeautifulSoup using pip
in Python 2.7. I keep getting an error message, and can't understand why.
I followed the instructions to install pip, which was installed to the following directory: c:\Python27\Scripts\pip.exe
, then I tried adding it to the path, and running the pip install package
command.
tried it two different ways:
import sys
sys.path.append('C:\\Python27\\Scripts\\pip.exe')
pip install beautifulsoup4
import sys
sys.path.append('C:\\Python27\\Scripts')
pip install beautifulsoup4
both give me this error message:
>>> pip install beautifulsoup4
SyntaxError: invalid syntax
the shell is highlighting the word "install" and saying that it's invalid syntax.
I have no idea what's going on, so any help would be greatly appreciated.