pypipip95% confidence\u2191 323

Why does "pip install" inside Python raise a SyntaxError?

Full error message
I'm trying to use pip to install a package.  I try to run pip install from the Python shell, but I get a SyntaxError.  Why do I get this error?  How do I use pip to install the package?

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

pip is run from the command line, not the Python interpreter. It is a program that installs modules, so you can use them from Python. Once you have installed the module, then you can open the Python shell and do import selenium. The Python shell is not a command line, it is an interactive interpreter. You type Python code into it, not commands.

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/321892ab9e84a9dd73dbb6b5cb5f4d7f8ae95bf5bb65ff4cfae2f13e095b419c
hash \u00b7 321892ab9e84a9dd73dbb6b5cb5f4d7f8ae95bf5bb65ff4cfae2f13e095b419c
Why does &quot;pip install&quot; inside Python raise a Synta… — DepScope fix | DepScope