r/pythonhelp • • Oct 25 '22

installing module proble.

Hi, this is so basic I feel foolish but I can't figure it out. I'm very new to python and I'm trying to install requests. I've tried both

python -m pip install requests

And

pip install requests

And

pip3 install requests

All give me an invalid syntax error and I am baffled.

Thanks!

3 Upvotes

4 comments sorted by

View all comments

1

u/Goobyalus Oct 25 '22

Are you inside a Python shell instead of an OS shell?

2

u/DrMonkeyLady Oct 25 '22

I was- thank you!

1

u/Goobyalus Oct 25 '22

Make sure you're using the Python that you expect (e.g. python --version or python3 --version or whatever), and use that python with -m pip install requests so that it's installed for the correct version of Python.

If you have multiple versions of Python, it could be ambiguous which version the pip command applies to.