[issue45148] ensurepip upgrade fails

2021-09-09 Thread baterflyrity


baterflyrity  added the comment:

OK, ive caught the salt of ensurepip.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45148] ensurepip upgrade fails

2021-09-09 Thread Paul Moore


Paul Moore  added the comment:

> I don't know technical details but i can successfully use this command: `pip 
> install --upgrade pip`.

On Windows (and not under something like cygwin or msys, which have their own 
rules)? Anyway, it's not that important, the recommended approach is `python -m 
pip`, so whether using the non-recommended approach works or not doesn't really 
matter.

> On pip's issues tracker i was suggested to use `ensurepip --upgrade`.

Let's take that question back to the pip tracker. If you want the latest 
version of pip (as opposed to the bundled version) ensurepip isn't the right 
approach.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45148] ensurepip upgrade fails

2021-09-09 Thread baterflyrity


baterflyrity  added the comment:

>> You are wrong. Windows lets me update pip via pip.
>
>You have misinterpreted what you are seeing.

I don't know technical details but i can successfully use this command: `pip 
install --upgrade pip`.

>No, you should follow the correct process and use `python -m pip`, and not use 
>pip directly.

On pip's issues tracker i was suggested to use `ensurepip --upgrade`. Therefore 
it deletes global system's pip when is ran without sudo or admin rights (when 
the current version of pip is lower then bundled).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45148] ensurepip upgrade fails

2021-09-09 Thread Paul Moore


Paul Moore  added the comment:

> You are wrong. Windows lets me update pip via pip.

You have misinterpreted what you are seeing.

> Should i create new issue for this?

No, you should follow the correct process and use `python -m pip`, and not use 
pip directly.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45148] ensurepip upgrade fails

2021-09-09 Thread baterflyrity


baterflyrity  added the comment:

> Note the comment "to the bundled version".

Thanks. Have not knew.

> 1. You must *not* use the pip executable, you must use `python -m pip`, as 
> the command will be upgrading the pip executable and Windows won't let you 
> upgrade an executable you are using.

You are wrong. Windows lets me update pip via pip.

Also must notice that ensurepip also deletes the current pip before installing 
it's own. So in case of "Permission denied" error it just deletes pip (see 
https://github.com/pypa/pip/issues/9527). Should i create new issue for this?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45148] ensurepip upgrade fails

2021-09-09 Thread Paul Moore


Change by Paul Moore :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45148] ensurepip upgrade fails

2021-09-09 Thread Paul Moore


Paul Moore  added the comment:

>From the documentation:

> upgrade indicates whether or not to upgrade an existing installation of an 
> earlier version of pip to the bundled version.

Note the comment "to the bundled version". This command will not access the 
internet (also noted in the documentation) and so will not get a later version 
than the bundled one.

To get the latest version of pip, you need to use

/path/to/your/python -m pip install --upgrade pip

Note:

1. You must *not* use the pip executable, you must use `python -m pip`, as the 
command will be upgrading the pip executable and Windows won't let you upgrade 
an executable you are using.
2. You should use the full path to your Python, or ensure by other means that 
you are running the correct copy of Python. This command only upgrades the copy 
of pip associated with the Python interpreter you use to run the upgrade 
command.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45148] ensurepip upgrade fails

2021-09-09 Thread baterflyrity


baterflyrity  added the comment:

See also: https://github.com/pypa/pip/issues/10453

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45148] ensurepip upgrade fails

2021-09-09 Thread baterflyrity


New submission from baterflyrity :

Upgrading pip via ensurepip unfortunately doesn't do anything wealthy.

```bash
user@host MINGW64 ~
$ pip list | grep pip
pip   21.2.3
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the 'C:\Python39\python.exe -m pip install 
--upgrade pip' command.

user@host MINGW64 ~
$ py -m ensurepip --upgrade
Looking in links: c:\Users\BATERF~1\AppData\Local\Temp\tmpuv4go5fy
Requirement already satisfied: setuptools in c:\python39\lib\site-packages 
(57.4.0)
Requirement already satisfied: pip in c:\python39\lib\site-packages (21.2.3)

user@host MINGW64 ~
$ pip list | grep pip
pip   21.2.3
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the 'C:\Python39\python.exe -m pip install 
--upgrade pip' command.
```

--
components: Windows
messages: 401436
nosy: baterflyrity, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: ensurepip upgrade fails
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com