-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install pip with Python 2 needs documentation update #9577
Comments
https://pip.pypa.io/en/stable/installing/#python-and-os-compatibility Pip no longer supports Python 2. |
Well, the documentation should say that. But in any case what I did, does work, so that should be documented. I do think it’s important to support 2.7 as much as possible because some OS tools still use 2.7 (eg the Mac). For my work, I’ve moved over to 3.x except I’m having an awful time with installing pylucene so I’m trying 2.7 and it’s almost working whereas 3.x dies in ways that I don’t understand. |
@pfmoore linked you to pip's documentation. Could you clarify what more you want the documentation to say? Would a dedicated section talking about Python 2 support help? We have that too: https://pip.pypa.io/en/stable/development/release-process/#python-2-support |
I thought I made it clear. On page: The paragraph entitled "Installing with get-pip.py" says:
This section says nothing about this being for 3.x only. If you try to follow the instructions, you get an error about the 3.x python formatted string I get that the world is moving away from 2.7 to 3.x. I'm using 3.x myself and get annoyed whenever I have to deal with 2.7 The problem is, a lot of old OS tools (e.g. on the Mac) depend on Python 2.7, and that's not going to get fixed any time soon. Add extra disclaimers about 3.x or pointers to 2.7 pip would help a person not get lost in the weeds as to what was wrong. |
That page clearly states:
We can probably remove the Python 2.6 link and have a better sentence to direct users to the right place tho. |
Let me point out that other people have stumbled over this problem, so it's not just me who find the instructions not clear enough: https://stackoverflow.com/questions/65866417/pip-install-failing-on-python2 |
Yes me too. But with this command pip2 will be installed and will not entry in conflict with pip3? |
It shouldn't... On my mac:
On the other hand, my pip2 got mangled some how and it died because it had the formatted |
This should be resolved by pypa/get-pip#100. |
pip version
20.3.4
Python version
2.7.16
OS
Mac OS 10.15.7
Additional information
No response
Description
On page:
https://pip.pypa.io/en/stable/installing/
It says to install pip, use:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
This does not work on Python 2.7. You get the Python error:
python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 24244, in
main()
File "get-pip.py", line 199, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
from pip.internal.cli.main import main as pip_entry_point
File "/var/folders/k/blmzttsn5m35fd86smzys36h0000gp/T/tmpFuDDh2/pip.zip/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
The correct way to install pip on Python 2 is:
curl https://bootstrap.pypa.io/2.7/get-pip.py -o get-pip.py
and then
python get-pip.py
Expected behavior
pip for Python 2.7 should install without errors
How to Reproduce
Output
Code of Conduct
Either the get-pip.py should be made to run with either version of Python OR the documentation ( https://pip.pypa.io/en/stable/installing/ ) needs updating.
The text was updated successfully, but these errors were encountered: