I have a Macbook with OS X El Captain. I think that Python 2.7
comes preinstalled on it. However, I installed Python 3.5
too. When I started using Python 3
, I read that if I want to install a package, I should type:
pip3 install some_package
Anyway, now when I use
pip install some_package
I get some_package
installed for Python 3
. I mean I can import it and use it without problems. Moreover, when I type just pip3
in Terminal
, I got this message about the usage:
Usage:
pip <command> [options]
which is the same message I get when I type just pip
.
Does it mean that in previos versions, things were different, and now pip
and pip3
can be used interchangeably? If so, and for the sake of argument, how can I install packages for Python 2
instead of Python 3
?
Your
pip
is soft link to the same executable file path withpip3
. you can use below commands to check where yourpip
andpip3
real paths are:you may also use below commands to know more details:
When we installed different version of python, we may do such soft links to
it is same situation about
python
,python2
,python3
Below for who interested in how it happens in different case: