MacOS homebrew broken pip module

I can’t get my python 3.11.4 installation via homebrew to work with pip on macos.

python3 -m pip gives the following error:
/opt/homebrew/opt/python@3.11/bin/python3.11: No module named pip.main; ‘pip’ is a package and cannot be directly executed

and then using pip3 as it’s own command it simply isn’t found on my system:
bash: /opt/homebrew/bin/pip3: No such file or directory

I’ve tried uninstalling and re installing with homebrew, and have had no success getting pip to work. Have also tried ensure pip and have had no success.

Please show a complete error message by copying and pasting all the output you get, and formatting it as multi-line code. Please also talk us through steps to reproduce and diagnose the issue:

  • exactly how did you install this version of Python, step by step?
  • What is in the system PATH?
  • What is the current working directory? Is there anything in there with a name anything like pip?
  • What do you get if you try running this Python directly and then checking sys.executable, sys.path etc.?

What exactly do you mean by this - what commands did you run, and what appeared to happen as a result?

I suspect you are not running the homebrew python3.

What does which python3 report?

When I run this I see a list of modules.

~/homebrew/bin/python3 -m pip list

brew search pip claims in its output that pip is part of the python cask.