Error installing pip on macOS 10.13 (beginner)

Hiya :slightly_smiling_face:

I’m an absolute beginner with coding and Python. I am trying to use Tweepy so that I can download Tweets from the Twitter API. This requires ‘pip’ for installation. I have downloaded Python 3.10.4 from the .org website (but in the error message below it looks like 2.7 is being used somehow).

Pip is supposed to be automatically installed if Python is downloaded from Python.org according to this page Installation - pip documentation v23.3.2.

I open the Terminal to run the pip install tweepy command, but get told that the pip command is not recognised:

Last login: Tue Apr 5 14:20:47 on ttys007 Meddles-MacBook-Pro-2:~ meddle$ pip install tweepy -bash: pip: command not found Meddles-MacBook-Pro-2:~ meddle$

In order to make sure pip is installed, I therefore run ensurepip, but I get the following error message:

Does anybody know where I am going wrong?

I thought it might have to do with being on my library wifi but I get the same result using hotspot.

Many thanks and much love,

Jules

update

I thought there might be a problem with using Python2, so I used this guide:Change Python Version Mac: How to set Python3 as a default python version on MacOS? - DEV Community

to set python3 as the default, which it now seems to be.

I then still had trouble running pip commands, so had to reinstall pip with the get-pip.py command instead of the basic one, which seems to work!

Seems this might be a problem for users downloading the latest Python but still using os10.13?