Search code examples
pythonpython-3.xpip

Python and pip installation on Mac don't show version?


On Mac OS.

Downloaded the Python from their website.

Python -V return Python 2.7.16, and python3 -V return Python 3.9.4

Installed pip with : python3 get-pip.py, got Successfully installed pip-21.0.1

But when I run pip -V I get File "/usr/local/bin/pip", line 1.... SyntaxError: invalid syntax

After reading here a lot, i could not understand (in simple words for dumbs) :

  1. How could you "alias" or update python to show/run in version 3+ ?
  2. Why I can't get the pip version if it's installed ?

Solution

  • Use pip as a module instead

    % python3 -m pip --version
    pip 21.0.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)