Re: python -m pip install and pip install
On Fri, 11 Oct 2019 13:02:26 +0530, Pankaj Jangid wrote: > Oh! I wasn't aware of this Windows thing. Thanks. Windows is suck, don't use it at all. -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
On Fri, 11 Oct 2019 07:35:23 +0300, אורי wrote: > When you upgrade pip, you have to write: > > python -m pip install --upgrade pip > > When you install or upgrade anything else, you can write "pip install". > > You can't upgrade pip using "pip install --upgrade pip". No, see the following: werner@debian-01:~$ pip install --upgrade pip Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting pip Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4a/ 08/6ca123073af4ebc4c5488a5bc8a010ac57aa39ce4d3c8a931ad504de4185/pip-19.3- py2.py3-none-any.whl (1.4MB) || 1.4MB 2.2MB/s Installing collected packages: pip Found existing installation: pip 19.2.3 Uninstalling pip-19.2.3: Successfully uninstalled pip-19.2.3 Successfully installed pip-19.3 -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
Chris Angelico writes: > On Fri, Oct 11, 2019 at 3:37 PM אורי wrote: >> >> When you upgrade pip, you have to write: >> >> python -m pip install --upgrade pip >> >> When you install or upgrade anything else, you can write "pip install". >> >> You can't upgrade pip using "pip install --upgrade pip". >> > > Only a consideration on Windows. Other platforms are absolutely fine > upgrading pip either way. > Oh! I wasn't aware of this Windows thing. Thanks. -- Pankaj Jangid -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
On Fri, Oct 11, 2019 at 3:37 PM אורי wrote: > > When you upgrade pip, you have to write: > > python -m pip install --upgrade pip > > When you install or upgrade anything else, you can write "pip install". > > You can't upgrade pip using "pip install --upgrade pip". > Only a consideration on Windows. Other platforms are absolutely fine upgrading pip either way. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
When you upgrade pip, you have to write: python -m pip install --upgrade pip When you install or upgrade anything else, you can write "pip install". You can't upgrade pip using "pip install --upgrade pip". אורי u...@speedy.net On Mon, Oct 7, 2019 at 2:21 PM Hongyi Zhao wrote: > Hi, > > What's the diff: > > python -m pip install mod > and > pip install mod > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
Michael Torrie writes: > 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. > I am talking about environments where both python2 and python3 installed. >> 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. I am just trying to think about scenarios where one approach is better than other. Nothing more. -- Pankaj Jangid -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
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. -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
Hongyi Zhao writes: > Hongyi Zhao 于2019年10月8日周二 下午4:53写道: >> >> Cameron Simpson 于2019年10月8日周二 下午12:25写道: >> > >> > On 08Oct2019 02:49, Hongyi Zhao 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. > > And nowadays, the pyenv + vurtualenv + pip + pipenv is the suggested > env management method for python. > In this way, the pipenv will solve the version dependence of the > underlying tool chain and corresponding used packages/modules. > Exactly. 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. Similarly, there may be other commands specific to python2 and python3. All of them work flawlessly if you just replace python2 with python3. -- Regards, Pankaj Jangid -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
Cameron Simpson 于2019年10月8日周二 下午12:25写道: > > On 08Oct2019 02:49, Hongyi Zhao 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 -- Hongsheng Zhao Institute of Semiconductors, Chinese Academy of Sciences GnuPG DSA: 0xD108493 -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
Hongyi Zhao 于2019年10月8日周二 下午4:53写道: > > Cameron Simpson 于2019年10月8日周二 下午12:25写道: > > > > On 08Oct2019 02:49, Hongyi Zhao 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. And nowadays, the pyenv + vurtualenv + pip + pipenv is the suggested env management method for python. In this way, the pipenv will solve the version dependence of the underlying tool chain and corresponding used packages/modules. > > > > > It isn't a deal breaker, but preferred: one less moving part. > > > > Cheers, > > Cameron Simpson > > > > -- > Hongsheng Zhao > Institute of Semiconductors, Chinese Academy of Sciences > GnuPG DSA: 0xD108493 -- Hongsheng Zhao Institute of Semiconductors, Chinese Academy of Sciences GnuPG DSA: 0xD108493 -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
On 08Oct2019 02:49, Hongyi Zhao 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. It isn't a deal breaker, but preferred: one less moving part. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
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 If so, why not just: pip2 install mod > > and > > python3 -m pip install mod and using: pip3 install mod > > will install the package in the corresponding PYTHONPATH. -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
Hongyi Zhao writes: > Hi, > > What's the diff: > > python -m pip install mod > and > pip install mod A very good use-case is when you have both, python2 and python3 installed. python2 -m pip install mod and python3 -m pip install mod will install the package in the corresponding PYTHONPATH. -- Regards Pankaj -- https://mail.python.org/mailman/listinfo/python-list
Re: python -m pip install and pip install
On Mon, Oct 7, 2019 at 10:21 PM Hongyi Zhao wrote: > > Hi, > > What's the diff: > > python -m pip install mod > and > pip install mod I presume from your series of posts that you either do not have access to a web browser, or do not trust search engines, because all of these questions can be answered easily and simply by a quick search of Google/DuckDuckGo/Bing/etc/etc/etc. Please, make some effort to research things yourself before asking questions. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
python -m pip install and pip install
Hi, What's the diff: python -m pip install mod and pip install mod -- https://mail.python.org/mailman/listinfo/python-list