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

Python 2.7 Broken #82

Closed
ghost opened this issue Jan 23, 2021 · 11 comments
Closed

Python 2.7 Broken #82

ghost opened this issue Jan 23, 2021 · 11 comments

Comments

@ghost
Copy link

ghost commented Jan 23, 2021

Latest commit broke python 2.7 compatibility over string formatting :(

python2.7 get-pip.py
Traceback (most recent call last):
    File "get-pip.py", line 24226, in <module>
        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 "/tmp/tmpO8Gfeg/pip.zip/pip/_internal/cli/main.py", line 60
        sys.stderr.write(f"ERROR: {exc}")
        ^

SyntaxError: invalid syntax
@ghost ghost closed this as completed Jan 23, 2021
@ghost
Copy link
Author

ghost commented Jan 23, 2021

pip 21.0 removes python2.7 support

@pradyunsg
Copy link
Member

Please use https://bootstrap.pypa.io/2.7/get-pip.py.

@ghost
Copy link
Author

ghost commented Jan 23, 2021

Thanks :)

@webknjaz
Copy link
Member

@pradyunsg did you consider enabling discussions on this repo? This could be useful in the Q&A format.

@taro-spb
Copy link

@pradyunsg Will subdirectory 2.7/ be left upstream forever or are there any plans to remove it in the future?

@b4cktr4ck2
Copy link

Just had this issue on an up-to-date Kali Linux installation with Python 2.7.18- the url @pradyunsg specified worked for me.

@pradyunsg
Copy link
Member

@taro-spb there are no plans at this time to remove that script.

This was referenced Jan 26, 2021
kernicPanel added a commit to kernicPanel/openedx-docker that referenced this issue Jan 29, 2021
As python 2.7 is used in all ubuntu images, we need to get matching
pip version (pypa/get-pip#82)
kernicPanel added a commit to kernicPanel/openedx-docker that referenced this issue Jan 29, 2021
As python 2.7 is used in all ubuntu images, we need to get matching
pip version (pypa/get-pip#82)
kernicPanel added a commit to kernicPanel/openedx-docker that referenced this issue Jan 29, 2021
As python 2.7 is used in all ubuntu images, we need to get matching
pip version (pypa/get-pip#82)
sampaccoud pushed a commit to openfun/openedx-docker that referenced this issue Jan 29, 2021
As python 2.7 is used in all ubuntu images, we need to get matching
pip version (pypa/get-pip#82)
@matthewfeickert
Copy link

matthewfeickert commented Mar 22, 2022

@pradyunsg Will subdirectory 2.7/ be left upstream forever or are there any plans to remove it in the future?
...
@taro-spb there are no plans at this time to remove that script.

@pradyunsg @webknjaz Apologies in advance if you'd really prefer to not have continuation of discussion on closed Issues (I'm happy to open a new one instead), but I noticed today that the 2.7/ subdirectory has been removed

$ docker run --rm -ti python:2.7 /bin/bash
root@1a9208fd00d3:/# curl -sLO https://bootstrap.pypa.io/2.7/virtualenv.pyz
root@1a9208fd00d3:/# cat virtualenv.pyz 
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
root@1a9208fd00d3:/# curl -sLO https://bootstrap.pypa.io/2.7/get-pip.py
root@1a9208fd00d3:/# cat get-pip.py 
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
root@1a9208fd00d3:/# 

...though I guess just looking at the index of https://bootstrap.pypa.io/ would have told me this as well.

index

I didn't see a PR that linked back to this Issue, so is there a thread that I can follow to direct other people to on the removal? I assume the advice now is to stop using Python 2 and if you can't yet try to find a workaround to manually bootstrap a virtual environment? (To be clear, for 2 years past EOL that's very reasonable and appropriate in my mind. 👍)

Apologies as well for bringing up a Python 2 issue. I'm not actively trying to still use it 🙁, but my physics collaboration has some of our LTS software stack locked to it.

@pradyunsg
Copy link
Member

Those got moved to the pip directory, as part of a backwards-incompatible reorganisation: #61

@pradyunsg
Copy link
Member

b44c524 was the commit that provided a helpful message to users when this was migrated. That was reverted after a grace period.

@matthewfeickert
Copy link

matthewfeickert commented Mar 22, 2022

Excellent. Thanks very much for this helpful information and for taking the time to reply so quickly!

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

No branches or pull requests

5 participants