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

pip was broken after upgrade to 21 #9581

Closed
ninjachen opened this issue Feb 10, 2021 · 3 comments
Closed

pip was broken after upgrade to 21 #9581

ninjachen opened this issue Feb 10, 2021 · 3 comments
Labels
resolution: no action When the resolution is to not do anything

Comments

@ninjachen
Copy link

pip version

21.0.1

Python version

2.7

OS

macos

Additional information

No response

Description

I upgrade pip from 6.1.1 to 21.0.1, then it was not working.

Expected behavior

Expect pip install works

How to Reproduce

  1. sudo pip install -U pip
  2. pip
  3. Failed with error message
 Traceback (most recent call last):
  File "/usr/local/bin/pip", line 9, in <module>
    load_entry_point('pip==21.0.1', 'console_scripts', 'pip')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2697, in load_entry_point
    return ep.load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2370, in load
    return self.resolve()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2376, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Python/2.7/site-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

**Output**

```console

```


**Code of Conduct**

- [X] I agree to follow the PSF Code of Conduct

@ninjachen ninjachen added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Feb 10, 2021
@ninjachen
Copy link
Author

Here is a snapshot of the error
error_img

@ninjachen
Copy link
Author

To someone meet the same issue, I have a workaround

sudo rm -rf  /Library/Python/2.7/site-packages/pip*
sudo python -m ensurepip
sudo pip install --upgrade pip==18.1

This should work on maxOS

@uranusjr
Copy link
Member

Python 2 is no longer supported. 20.3.4 is the last version taht does.

@uranusjr uranusjr added resolution: no action When the resolution is to not do anything and removed S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Feb 10, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: no action When the resolution is to not do anything
Projects
None yet
Development

No branches or pull requests

2 participants