Syntax Error on BS4 Install

983 views
Skip to first unread message

hmsdreadnought1875

unread,
Oct 16, 2020, 10:37:11 AM10/16/20
to beautifulsoup
Hello All,

I am trying to install BS4 using Windows PowerShell using the install command pip install beautifulsoup4. However every time I run the command I get the following error message:

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

What am I doing wrong?

Thanks in advance!

facelessuser

unread,
Oct 16, 2020, 10:41:59 AM10/16/20
to beautifulsoup
You need to do this on the command line, not within a Python session.

leonardr

unread,
Oct 16, 2020, 10:42:10 AM10/16/20
to beautifulsoup
It looks like you're running the pip command from within the Python interpreter. Try running it from the PowerShell command line itself.

I haven't used PowerShell myself, but this similar Stack Overflow question indicates that pip should be accessible from PowerShell if you're using a recent release of Python.

Leonard

hmsdreadnought1875

unread,
Oct 16, 2020, 11:35:50 AM10/16/20
to beautifulsoup
Thank you both for your assistance. I got it installed!
Reply all
Reply to author
Forward
0 new messages