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

KeyError: 'ctranslate2' on installation attempt #418

Open
bruceleerabbit opened this issue May 17, 2024 · 0 comments
Open

KeyError: 'ctranslate2' on installation attempt #418

bruceleerabbit opened this issue May 17, 2024 · 0 comments

Comments

@bruceleerabbit
Copy link

bruceleerabbit commented May 17, 2024

Installation as a user on a shell account service was attempted by running pip install --verbose argostranslate. The output included a very long list of skipped installations:

…
Skipping link: none of the wheel's tags match: cp310-cp310-win_amd64: https://files.pythonhosted.org/packages/b7/ea/9172bb485a6f4f26d35f9e3bad159436e19582ffebf2dabe9aa5a5fd6a91/ctranslate2-4.3.0-cp310-cp310-win_amd64.whl#sha256=799614577f5646a3a5d9b4ef99730fe4f91ec759936465a81bf02182ae827650 (from https://pypi.org/simple/ctranslate2/) (requires-python:>=3.8)
…

Many of those lead up to:

…
Given no hashes to check 3 links for project 'ctranslate2': discarding no candidates
Collecting ctranslate2<5,>=4.0
  Created temporary directory: /tmp/pip-unpack-2gx25dj9
  Getting credentials from keyring for files.pythonhosted.org
  Looking up "https://files.pythonhosted.org/packages/54/5a/004d872da49aa4a6f1fd23220f9c50c253b8996d2d8767ed368c58001a04/ctranslate2-4.2.1-
cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" in the cache
  No cache entry available
  https://files.pythonhosted.org:443 "GET /packages/54/5a/004d872da49aa4a6f1fd23220f9c50c253b8996d2d8767ed368c58001a04/ctranslate2-4.2.1-cp
39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl HTTP/1.1" 200 179330893
  Downloading ctranslate2-4.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (179.3 MB)
     |████████████████████████████████| 179.3 MB 264 kB/s eta 0:00:01  Ignoring unknown cache-control directive: immutable
  Updating cache with response from "https://files.pythonhosted.org/packages/54/5a/004d872da49aa4a6f1fd23220f9c50c253b8996d2d8767ed368c5800
1a04/ctranslate2-4.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
  Caching due to etag
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 171, in _merge_into_criterion
    crit = self.state.criteria[name]
KeyError: 'ctranslate2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 223, in _main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 346, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 122, in resolve
    self._result = resolver.resolve(
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 453, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 347, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 207, in _attempt_to_pin_criterion
    criteria = self._get_criteria_to_update(candidate)
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 199, in _get_criteria_to_update
    name, crit = self._merge_into_criterion(r, parent=candidate)
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 173, in _merge_into_criterion
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 82, in from_requirement
    if not cands:
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/structs.py", line 124, in __bool__
    return bool(self._sequence)
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 99, in __bool__
    return any(self)
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 239, in iter_index_candidates
    candidate = self._make_candidate_from_link(
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 167, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
…[snip]…
  File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/controller.py", line 309, in cache_response
    cache_url, self.serializer.dumps(request, response, body=body)
  File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/serialize.py", line 72, in dumps
    return b",".join([b"cc=4", msgpack.dumps(data, use_bin_type=True)])
MemoryError

All the skipped files output says “requires-python:>=3.8”. The shell service has many versions installed, but 3.9 seems to be the default IIUC:

$ python<tab>
python2           python3           python3.7         python3.9         python3-config
python2.7         python3.5         python3.7m        python3.9-config
$ pip --version
pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)

It’s ½ tempting to try python3.9 -m pip install argostranslate, but it looks like pip is automatically selecting python 3.9.

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

1 participant