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

ImportError: cannot import name 'NoReturn' - during pip install --upgrade with Python 3.6.1 #9891

Closed
1 task done
emezh opened this issue Apr 27, 2021 · 1 comment
Closed
1 task done
Labels
resolution: duplicate Duplicate of an existing issue/PR type: bug A confirmed bug or unintended behavior

Comments

@emezh
Copy link

emezh commented Apr 27, 2021

Description

After pip upgrade to 21.1 (Py 3.6.1) any pip install command fails with
ImportError: cannot import name 'NoReturn'

upgrading to pip==21.0.1 works fine.

Expected behavior

no error thrown

pip version

21.1

Python version

3.6.1

OS

CentOS 7.1

How to Reproduce

$ /tools/python/3.6.1-RHEL7/bin/python3 -m venv --copies venv_py3
$ source venv_py3/bin/activate
(venv_py3) $ pip3 install --upgrade pip
Cache entry deserialization failed, entry ignored
Collecting pip
  Downloading https://files.pythonhosted.org/packages/ac/cf/0cc542fc93de2f3b9b53cb979c7d1118cffb93204afb46299a9f858e113f/pip-21.1-py3-none-any.whl (1.5MB)
    100% |████████████████████████████████| 1.6MB 1.1MB/s 
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
      Successfully uninstalled pip-9.0.1
Successfully installed pip-21.1

(venv_py3) $ pip3 install -r requirements.txt
Traceback (most recent call last):
  File "venv_py3/bin/pip3", line 7, in <module>
    from pip._internal.cli.main import main
  File "venv_py3/lib/python3.6/site-packages/pip/_internal/cli/main.py", line 9, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "venv_py3/lib/python3.6/site-packages/pip/_internal/cli/autocompletion.py", line 10, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "venv_py3/lib/python3.6/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
    from pip._internal.cli import cmdoptions
  File "venv_py3/lib/python3.6/site-packages/pip/_internal/cli/cmdoptions.py", line 30, in <module>
    from pip._internal.utils.hashes import STRONG_HASHES
  File "venv_py3/lib/python3.6/site-packages/pip/_internal/utils/hashes.py", line 2, in <module>
    from typing import TYPE_CHECKING, BinaryIO, Dict, Iterator, List, NoReturn
ImportError: cannot import name 'NoReturn'

Output

No response

Code of Conduct

@emezh emezh added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Apr 27, 2021
@pfmoore
Copy link
Member

pfmoore commented Apr 27, 2021

This is fixed in master and will be in the 21.1.1 release (no confirmed date for that yet). See #9831.

@pfmoore pfmoore closed this as completed Apr 27, 2021
@pfmoore pfmoore added resolution: duplicate Duplicate of an existing issue/PR and removed S: needs triage Issues/PRs that need to be triaged labels Apr 27, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: duplicate Duplicate of an existing issue/PR type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants