python -m pip install and pip install

Michael Torrie torriem at gmail.com
Thu Oct 10 13:54:33 EDT 2019


On 10/10/19 1:21 AM, Pankaj Jangid wrote:
> So the scripts will just work fine if you simply use ~import pip~
> and work with it.
> 
> Suppose you were writing bash scripts around python programs. Then
> what will be the behaviour of,
> 
> pip2 install mod
> 
> under a python3 environment.

If Python 2 wasn't installed, pip2 wouldn't be found at all. If Python 2
was available, it would happily install mod under the default/current
Python 2 environment.

> Similarly, there may be other commands specific to python2 and
> python3. All of them work flawlessly if you just replace python2 with
> python3.

Not sure what you're getting at there.



More information about the Python-list mailing list