패키지를 설치할 때 "macOS 로드 중"에서 pip가 중단됩니다.

패키지를 설치할 때 "macOS 로드 중"에서 pip가 중단됩니다.

pip예를 들어(실행 중 pip install geoclue2 -v) 을 사용하여 무엇이든 설치할 때 무기한 정지됩니다.

Using pip 21.0.1 from /usr/lib/python3.9/site-packages/pip (python 3.9)
Defaulting to user installation because normal site-packages is not writeable
Created temporary directory: /tmp/pip-ephem-wheel-cache-ujsolamd
Created temporary directory: /tmp/pip-req-tracker-d3dddja9
Initialized build tracking at /tmp/pip-req-tracker-d3dddja9
Created build tracker: /tmp/pip-req-tracker-d3dddja9
Entered build tracker: /tmp/pip-req-tracker-d3dddja9
Created temporary directory: /tmp/pip-install-kl5q0ihq
1 location(s) to search for versions of geoclue2:
* https://pypi.org/simple/geoclue2/
Fetching project page and analyzing links: https://pypi.org/simple/geoclue2/
Getting page https://pypi.org/simple/geoclue2/
Found index url https://pypi.org/simple
Getting credentials from keyring for https://pypi.org/simple
Loading KWallet
Loading SecretService
Loading Windows
Loading chainer
Loading macOS

이 상태에서 중단하면 다음과 같은 결과가 발생합니다.

Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 171, in _merge_into_criterion
    crit = self.state.criteria[name]
KeyError: 'geoclue2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 189, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 178, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 316, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 121, in resolve
    self._result = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 453, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 318, in resolve
    name, crit = self._merge_into_criterion(r, parent=None)
  File "/usr/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _merge_into_criterion
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "/usr/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 82, in from_requirement
    if not cands:
  File "/usr/lib/python3.9/site-packages/pip/_vendor/resolvelib/structs.py", line 124, in __bool__
    return bool(self._sequence)
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in __bool__
    return any(self)
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 35, in _iter_built
    for version, func in infos:
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 220, in iter_index_candidate_infos
    result = self._finder.find_best_candidate(
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/package_finder.py", line 872, in find_best_candidate
    candidates = self.find_all_candidates(project_name)
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/package_finder.py", line 815, in find_all_candidates
    package_links = self.process_project_url(
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/package_finder.py", line 779, in process_project_url
    html_page = self._link_collector.fetch_page(project_url)
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 617, in fetch_page
    return _get_html_page(location, session=self.session)
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 429, in _get_html_page
    resp = _get_html_response(url, session=session)
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 126, in _get_html_response
    resp = session.get(
  File "/usr/lib/python3.9/site-packages/pip/_vendor/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3.9/site-packages/pip/_internal/network/session.py", line 424, in request
    return super().request(method, url, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/pip/_vendor/requests/sessions.py", line 528, in request
    prep = self.prepare_request(req)
  File "/usr/lib/python3.9/site-packages/pip/_vendor/requests/sessions.py", line 456, in prepare_request
    p.prepare(
  File "/usr/lib/python3.9/site-packages/pip/_vendor/requests/models.py", line 320, in prepare
    self.prepare_auth(auth, url)
  File "/usr/lib/python3.9/site-packages/pip/_vendor/requests/models.py", line 551, in prepare_auth
    r = auth(self)
  File "/usr/lib/python3.9/site-packages/pip/_internal/network/auth.py", line 209, in __call__
    url, username, password = self._get_url_and_credentials(req.url)
  File "/usr/lib/python3.9/site-packages/pip/_internal/network/auth.py", line 184, in _get_url_and_credentials
    username, password = self._get_new_credentials(original_url)
  File "/usr/lib/python3.9/site-packages/pip/_internal/network/auth.py", line 156, in _get_new_credentials
    get_keyring_auth(index_url, username) or
  File "/usr/lib/python3.9/site-packages/pip/_internal/network/auth.py", line 58, in get_keyring_auth
    cred = get_credential(url, username)
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/keyring/core.py", line 70, in get_credential
    return get_keyring().get_credential(service_name, username)
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/keyring/backends/chainer.py", line 71, in get_credential
    credential = keyring.get_credential(service, username)
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/keyring/backends/SecretService.py", line 119, in get_credential
    collection = self.get_preferred_collection()
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/keyring/backends/SecretService.py", line 65, in get_preferred_collection
    collection.unlock()
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/secretstorage/collection.py", line 67, in unlock
    return unlock_objects(self.connection, [self.collection_path])
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/secretstorage/util.py", line 154, in unlock_objects
    dismissed, (signature, unlocked) = exec_prompt(connection, prompt)
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/secretstorage/util.py", line 140, in exec_prompt
    dismissed, result = connection.recv_until_filtered(signals).body
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/jeepney/io/blocking.py", line 181, in recv_until_filtered
    self.recv_messages(timeout=deadline_to_timeout(deadline))
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/jeepney/io/blocking.py", line 116, in recv_messages
    msg = self.receive(timeout=timeout)
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/jeepney/io/blocking.py", line 101, in receive
    b = self._read_some_data(timeout=deadline_to_timeout(deadline))
  File "/home/xiaoxiae/.local/lib/python3.9/site-packages/jeepney/io/blocking.py", line 105, in _read_some_data
    for key, ev in self.selector.select(timeout):
  File "/usr/lib/python3.9/selectors.py", line 469, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt
Removed build tracker: '/tmp/pip-req-tracker-0pqq_7y5'

3.9.1Manjaro에서 Python을 실행 중 입니다 .

어떤 도움이라도 대단히 감사하겠습니다.

답변1

PyPi 자격 증명을 망친 후에도 동일한 문제가 발생했습니다. 다음은 나를 위해 해결되었습니다.

export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring

바라보다:https://github.com/pypa/pip/issues/7883

관련 정보