Why do I need to use pip3 but not pip
Cameron Simpson
cs at cskk.id.au
Sat Mar 30 04:35:32 EDT 2019
On 30Mar2019 13:50, Arup Rakshit <ar at zeit.io> wrote:
>When I read this https://pip.pypa.io/en/stable/installing/ it says I
>have the pip installed when I installed the python from official doc.
>But when I run the `pip` command from shell, I get error, but pip3
>works.
>
>~/python_playground
>▶ pip --version
>
>zsh: command not found: pip
>
>~/python_playground ⍉
>▶ pip3 --version
>
>pip 18.1 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
Ok, you've installed python 3 on a Mac.
Historically most systems have shipped with python 2 (from the OS
vendor, which is Apple in your case), and the "python" command invokes
Python 2. So python 3 is installed as the "python3" command to avoid
confusion. The "pip" command from your python 3 install looks like it
is also installed as "pip3" to avoid confusion.
>Do I always need to install using pip3 program then?
Yes, that is correct for this particular install.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Python-list
mailing list