git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

python -m pip install and pip install


Cameron Simpson <cs at cskk.id.au> ?2019?10?8??? ??12:25???
>
> On 08Oct2019 02:49, Hongyi Zhao <hongyi.zhao at gmail.com> wrote:
> >On Tue, 08 Oct 2019 06:28:05 +0530, Pankaj Jangid wrote:
> >> A very good use-case is when you have both, python2 and python3
> >> installed.
> >> python2 -m pip install mod
> >> python3 -m pip install mod
> >> will install the package in the corresponding PYTHONPATH.
> >>
> >
> >If so, why not just:
> >pip2 install mod
> >and using:
> >pip3 install mod
>
> Because of the slight disconnect between "pip2" and "python2", etc. Do
> you _know_ they both use the same Python install? With "pythonX -m pip"
> you're using the same python executable which will be accessing what you
> just installed.

I use pyenv + pip, which will do the trick.

>
> It isn't a deal breaker, but preferred: one less moving part.
>
> Cheers,
> Cameron Simpson <cs at cskk.id.au>



-- 
Hongsheng Zhao <hongyi.zhao at gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493