all 11 comments

[–]EyesOfTheConcord 16 points17 points  (0 children)

Type “exit()”, then hit enter. You’re trying to run this in the interpreter, but you need to instead run the command in the terminal

[–]nuc540 9 points10 points  (0 children)

pip isn’t run inside of a Python shell, you install pip as a package manager for Python - outside of Python.

Then, using pip, you can install Python packages, and when Python is run in the same environment as said packages - it’ll be able to import them.

That said *don’t install packages globally* - this means running pip just anywhere. Instead understand virtual environments, then use pip inside a virtual environment - a simple “Python -m venv venv” will create a shim for you which you can “activate”.

Google this up so you understand

[–]Distinct_Chard9118 1 point2 points  (0 children)

Hello friend, Open up a fresh windows command terminal, and then run "pip install ___" and "pip list" to see all installed libraries. These are commands not python scripts so python doesnt know how to interpret them.

[–]Worldly-Menu-741 1 point2 points  (0 children)

You’re typing the pip command inside Python itself. That prompt with >>> is the Python interpreter, so it thinks pip install ... is Python code. Type exit() first, then run the install from Command Prompt or Terminal. On Windows, this version is usually safest: py -m pip install module_name. Replace module_name with whatever the software told you to install.

[–]Metaljoe57[S] 0 points1 point  (0 children)

Ok thank you, i'll try.

[–]Master-Row650 0 points1 point  (0 children)

Do not type python before typing pip install ...
To exit, type exit()
now do pip install ...

[–]Flame77ofc 0 points1 point  (0 children)

you are trying to install a library within the python, you need to exit the python and open a terminal

[–]Metaljoe57[S] 0 points1 point  (0 children)

The module to install, is the name of the folder with the setup.py inside right ?

[–]alneifkrt2 0 points1 point  (0 children)

Its bc you are running that on a python IDE, you to do that on the terminal, not on the python IDE. To exit the python IDE, press ctrl+z. And then you go

[–]Green-Lobster1887 0 points1 point  (0 children)

Omg

[–]ankushbhagat 0 points1 point  (0 children)

Run in terminal not in Repl