pytermgui: [BUG] pip install hangs on windows.

Describe the bug As the title says, when Installing on windows with python3.exe -m pip -vv install pytermgui the installation hangs.

To Reproduce

  1. run python3.exe -m pip -vv install pytermgui
  2. wait

Expected behavior pytermgui to be installed.

Screenshots

Collecting pytermgui
  Created temporary directory: C:\Users\MyUser\AppData\Local\Temp\pip-unpack-ijudf3ut
  Looking up "https://files.pythonhosted.org/packages/c9/ce/2e249bae470c52429b1c93b5013db52f6c7105a82054ce7e88df08494bd8/pytermgui-2.0.0.tar.gz" in the cache
  Current age based on date: 2986
  Ignoring unknown cache-control directive: immutable
  Freshness lifetime from max-age: 365000000
  The response is "fresh", returning cached response
  365000000 > 2986
  Using cached pytermgui-2.0.0.tar.gz (62 kB)
  Added pytermgui from https://files.pythonhosted.org/packages/c9/ce/2e249bae470c52429b1c93b5013db52f6c7105a82054ce7e88df08494bd8/pytermgui-2.0.0.tar.gz#sha256=6cdd4636278bf8ef008508a9327576726f2caaaf19f694a855e3b475b1681dc3 to build tracker 'C:\\Users\\MyUser\\AppData\\Local\\Temp\\pip-req-tracker-eznv_81d'
  Running setup.py (path:C:\Users\MyUser\AppData\Local\Temp\pip-install-a8zu6svx\pytermgui_981a92d1aa834d8086c13fa048af84be\setup.py) egg_info for package pytermgui
  Created temporary directory: C:\Users\MyUser\AppData\Local\Temp\pip-pip-egg-info-4hm9lmls
  Running command python setup.py egg_info

System information

  • Windows 10 Home (21H2)
  • Python 3.10.2
  • The below traceback shows pycharm 2021.3.1, but the error still occurs in the root python3 install location.

Possible cause After force closing the installation (Ctrl + C) the traceback indicates the installation is waiting for userinteraction str = proc.stdout.readline()

Exception information:
Traceback (most recent call last):
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\cli\base_command.py", line 164, in exc_logging_wrapper
    status = run_func(*args)
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\cli\req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\commands\install.py", line 338, in run
    requirement_set = resolver.resolve(
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 482, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 349, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 151, in __bool__
    return bool(self._sequence)
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
    return any(self)
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
    candidate = func()
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 201, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 281, in __init__
    super().__init__(
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 156, in __init__
    self.dist = self._prepare()
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 225, in _prepare
    dist = self._prepare_distribution()
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 292, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 482, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 546, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 58, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\distributions\sdist.py", line 49, in prepare_distribution_metadata
    self.req.prepare_metadata()
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\req\req_install.py", line 561, in prepare_metadata
    self.metadata_directory = generate_metadata_legacy(
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\operations\build\metadata_legacy.py", line 59, in generate_metadata
    call_subprocess(
  File "c:\users\MyUser\pycharmprojects\tui_project\venv\lib\site-packages\pip\_internal\utils\subprocess.py", line 204, in call_subprocess
    line: str = proc.stdout.readline()
  File "S:\Programs\Python310\lib\encodings\cp1252.py", line 22, in decode
    def decode(self, input, final=False):
KeyboardInterrupt
Removed pytermgui from https://files.pythonhosted.org/packages/c9/ce/2e249bae470c52429b1c93b5013db52f6c7105a82054ce7e88df08494bd8/pytermgui-2.0.0.tar.gz#sha256=6cdd4636278bf8ef008508a9327576726f2caaaf19f694a855e3b475b1681dc3 from build tracker 'C:\\Users\\MyUser\\AppData\\Local\\Temp\\pip-req-tracker-eznv_81d'
Removed build tracker: 'C:\\Users\\MyUser\\AppData\\Local\\Temp\\pip-req-tracker-eznv_81d''```

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 24 (13 by maintainers)

Most upvoted comments

That’s really weird. I have no clue what piece of code could’ve cause this issue between the versions, since there was no code in the traceback from the library. I don’t have a Windows machine with me until late next week, so I can’t really test it myself for the time being. Until then, I’ll put this into Help needed mode, and hope someone can figure it out.

Sorry for the inconvenience!

Alright, version 2.1.1 was just pushed out. It fixed all of the issues you talked about here.

If you run into anything else it would be a bit easier to follow if you raised a new issue.

Thank you for letting me know of these problems!

Thank you very much. it works exactly as expected right now.