Skip to content
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

Unhelpful error message when trying to use get-pip with Python 2.6 #24

Closed
offbyone opened this issue Apr 17, 2018 · 5 comments
Closed

Comments

@offbyone
Copy link

get-pip.py fails when run with Python 2.6. That's expected, but it should fail in a way that directs the user to bootstrap.pypa.io/2.6/get-pip.py

Sadly, due to cleared scrollback (and the fact that I was doing this with Ansible, which doesn't exactly give great error messages) I don't have the exact error message, but it was a SyntaxError on a set literal.

@hugovk
Copy link
Contributor

hugovk commented Apr 18, 2018

Perhaps something like #25?

@csm10495

This comment has been minimized.

@brainwane
Copy link

Now that Python 2.6 is no longer supported, shall we close this issue?

@xavfernandez
Copy link
Member

Now that Python 2.6 is no longer supported, shall we close this issue?

Well, the get-pip.py for Python 2.6 lives in https://bootstrap.pypa.io/2.6/get-pip.py precisely precisely because Python 2.6 isn't supported: I think the point of this issue is "How can we make the legacy get-pip.py scripts more discoverable ?

#25 seems like a good idea but if I'm not mistaken, it would mean that the get-pip.py program will never be allowed to use python3 only syntax:

$ cat test.py 
import sys

if sys.version_info[0] == 2:
    print('Abort !')
    sys.exit(0)

async def toto():
  return 45

$ python2.7 test.py 
  File "test3.py", line 7
    async def toto():
            ^
SyntaxError: invalid syntax

It does not print Abort! (or any possibly useful message) in Python 2, it simply crashes.

Maybe a https://bootstrap.pypa.io/README.txt could (marginally) help ?

@pradyunsg
Copy link
Member

This should be fixed with #100 now. At least in the newer templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants