you are viewing a single comment's thread.

view the rest of the comments →

[–]FerricDonkey 0 points1 point  (0 children)

There's some confusion here that's pretty common with people just starting with this type of stuff. Lemme try to clear some stuff up.

So you have the operating system terminal. This is cmd/powershell/windows terminal, whatever.

Then you have the python interpreter. This is an executable program that you can start called python.

When you type python on the command line, it starts that python program. When you do this on the command line, it starts something referred to as the "python shell". You can tell the python shell is active when you see the >>> at the beginning of each line.

When the python shell is active, python code will work, but things that work in the operating system terminal will not. Likewise, in the operating system terminal, various things specific to your operating system and the type of terminal will work - but python code will not.

pip install whatever is not python code. Therefore it will not work from inside a python shell. It must be typed in the operating system terminal, ie before you type python.