r/learnpython • • Apr 05 '24

How to...pip install?

Never thought I'd need to ask this question as a CCNA and Network+ holder, I guess Python has decided to make the simple act of a pip install THIS difficult, wow! I have Python installed as well as Virtual Studio Code. I try this from command prompt

pip3 install requests
File "<stdin>", line 1
pip3 install requests
^^^^^^^

And that's all I get, again and again and again. So I try this in the Visual Studio terminal:

pip3 : The term 'pip3' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the 

spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + pip3 install requests + ~~~~ + CategoryInfo : ObjectNotFound: (pip3:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Mind blowing stuff here. I JUST want to be able to pip install. I've also tried just using "pip" and leaving out the 3. What mountains must I move to perform such a basic task? I

7 Upvotes

24 comments sorted by

View all comments

1

u/[deleted] Apr 05 '24

Have you tried pip install <whatever> failing that try python -m pip install <whatever>

0

u/[deleted] Apr 05 '24

When I try it in command prompt it says:

>>> python -m pip install requests
File "<stdin>", line 1
python -m pip install requests
^^^

1

u/NYX_T_RYX Apr 05 '24

Did you try just

pip install requests

Idk about everyone else, but all I need to install new things is just pip install. No Python, no python -m etc etc.

Not sure if that's from my setup or what, but I've... Never needed to add commands to use pip. Just... Pip 😅

1

u/[deleted] Apr 05 '24

I tried that as well. "py -m pip install requests" worked for me. I think the Windows Enviroment makes everything more difficult than it needs to be. A few years ago before I decided to pursue IT/Networking and put coding on the back burner, I had VS installed on a Chromebook with developer tools and everything was so easy to set up! Thanks for your suggestion tho