Koa Install Error :- No matching distribution found for awscli

Hi All,
I am running into a installation error while installing koa v3. We have running Koa 3 live environment and we want to put up a open edx development installation with the same version. Unfortunately there is error thrown up at the very first script

wget https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/ansible-bootstrap.sh -O - | sudo bash

Error deals with awscli version. I tried deploying Lilac v2 and its gives the same error and stops

pip install -qr pre-requirements.txt --exists-action w
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.e[0m
pip install -qr requirements.txt --exists-action w
EPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.e[0m
ERROR: Could not find a version that satisfies the requirement awscli==1.20.27
ERROR: No matching distribution found for awscli==1.20.27
make: *** [Makefile:21: requirements] Error 1

Can anybody help me with this issue? Any workaround you would suggest?

So far I have tried i have tried installing that specific version and tried to rerun the script but the same error comes again.

curl “https://s3.amazonaws.com/aws-cli/awscli-bundle-1.20.27.zip” -o “awscli-bundle.zip”

sudo apt install unzip

unzip awscli-bundle.zip

sudo apt install python3.8-venv

sudo /usr/bin/python3.8 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

aws --version
aws-cli/1.20.27 Python/3.8.10 Linux/5.8.0-1040-azure botocore/1.21.27

Is there a fix for this?

I tried a lilac.master installation today, and it finished successfully. You seem to be using Python 3.5, are you sure you followed the installation instructions completely?

1 Like

Thanks @nedbat Ned for your response. I was using the below process to deploy on Ubuntu 20.04 Gen 1 VM on Azure.

https://openedx.atlassian.net/wiki/spaces/OpenOPS/pages/1969455764/Koa+Native+Open+edX+platform+Ubuntu+20.04+64+bit+Installation

The python version deployment is through script above. Is there anything I can do to fix or find out where the fault lies. I haven’t had much luck with deploying Koa3 and Lilac2. It would have been worth trying Lilac but I need Koa 3 test environment to match our production VM. I would greatly appreciate you help in this. Is there anything I can do to see that the correct python version 3.8 is deployed before starting the edx scripts?

Basically the solution was adding -E in the last bit of the command sudo -E bash

wget https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/ansible-bootstrap.sh -O - | sudo -E bash

Once this error was resolved.I still got another error

failed: [127.0.0.1] (item=/edx/app/edx_ansible/edx_ansible/pre-requirements.txt) => {“ansible_loop_var”: “item”, “changed”: false, “cmd”: ["/edx/app/edx_ansible/venvs/edx_ansible/bin/pip3", “install”, “-i”, “Simple index”, “-r”, “/edx/app/edx_ansible/edx_ansible/requirements.txt”], “item”: “/edx/app/edx_ansible/edx_ansible/pre-requirements.txt”, “msg”: “stdout: Already using interpreter /usr/bin/python3\nUsing base prefix ‘/usr’\nNew python executable in /edx/app/edx_ansible/venvs/edx_ansible/bin/python3\nAlso creating executable in /edx/app/edx_ansible/venvs/edx_ansible/bin/python\nInstalling setuptools, pip, wheel…\ndone.\nRunning virtualenv with interpreter /usr/bin/python3\nLooking in indexes: https://pypi.python.org/simple\nCollecting ansible==2.8.15\n Downloading ansible-2.8.15.tar.gz (12.7 MB)\n\n:stderr: ERROR: Exception:\nTraceback (most recent call last):\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/cli/base_command.py”, line 173, in _main\n status = self.run(options, args)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/cli/req_command.py”, line 203, in wrapper\n return func(self, options, args)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/commands/install.py”, line 315, in run\n requirement_set = resolver.resolve(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py”, line 94, in resolve\n result = self._result = resolver.resolve(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 472, in resolve\n state = resolution.resolve(requirements, max_rounds=max_rounds)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 341, in resolve\n self._add_to_criteria(self.state.criteria, r, parent=None)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 172, in _add_to_criteria\n if not criterion.candidates:\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_vendor/resolvelib/structs.py”, line 151, in bool\n return bool(self._sequence)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 140, in bool\n return any(self)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 128, in \n return (c for c in iterator if id(c) not in self._incompatible_ids)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 32, in _iter_built\n candidate = func()\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py”, line 204, in _make_candidate_from_link\n self._link_candidate_cache[link] = LinkCandidate(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 295, in init\n super().init(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 156, in init\n self.dist = self._prepare()\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 227, in _prepare\n dist = self._prepare_distribution()\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 305, in _prepare_distribution\n return self._factory.preparer.prepare_linked_requirement(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/operations/prepare.py”, line 508, in prepare_linked_requirement\n return self._prepare_linked_requirement(req, parallel_builds)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/operations/prepare.py”, line 550, in _prepare_linked_requirement\n local_file = unpack_url(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/operations/prepare.py”, line 249, in unpack_url\n unpack_file(file.path, location, file.content_type)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/utils/unpacking.py”, line 256, in unpack_file\n untar_file(filename, location)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/utils/unpacking.py”, line 226, in untar_file\n with open(path, “wb”) as destfp:\nUnicodeEncodeError: ‘latin-1’ codec can’t encode characters in position 132-135: ordinal not in range(256)\n”}
failed: [127.0.0.1] (item=/edx/app/edx_ansible/edx_ansible/requirements.txt) => {“ansible_loop_var”: “item”, “changed”: false, “cmd”: ["/edx/app/edx_ansible/venvs/edx_ansible/bin/pip3", “install”, “-i”, “Simple index”, “-r”, “/edx/app/edx_ansible/edx_ansible/requirements.txt”], “item”: “/edx/app/edx_ansible/edx_ansible/requirements.txt”, “msg”: “stdout: Looking in indexes: https://pypi.python.org/simple\nCollecting ansible==2.8.15\n Using cached ansible-2.8.15.tar.gz (12.7 MB)\n\n:stderr: ERROR: Exception:\nTraceback (most recent call last):\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/cli/base_command.py”, line 173, in _main\n status = self.run(options, args)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/cli/req_command.py”, line 203, in wrapper\n return func(self, options, args)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/commands/install.py”, line 315, in run\n requirement_set = resolver.resolve(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py”, line 94, in resolve\n result = self._result = resolver.resolve(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 472, in resolve\n state = resolution.resolve(requirements, max_rounds=max_rounds)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 341, in resolve\n self._add_to_criteria(self.state.criteria, r, parent=None)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 172, in _add_to_criteria\n if not criterion.candidates:\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_vendor/resolvelib/structs.py”, line 151, in bool\n return bool(self._sequence)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 140, in bool\n return any(self)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 128, in \n return (c for c in iterator if id(c) not in self._incompatible_ids)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 32, in _iter_built\n candidate = func()\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py”, line 204, in _make_candidate_from_link\n self._link_candidate_cache[link] = LinkCandidate(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 295, in init\n super().init(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 156, in init\n self.dist = self._prepare()\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 227, in _prepare\n dist = self._prepare_distribution()\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 305, in _prepare_distribution\n return self._factory.preparer.prepare_linked_requirement(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/operations/prepare.py”, line 508, in prepare_linked_requirement\n return self._prepare_linked_requirement(req, parallel_builds)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/operations/prepare.py”, line 550, in _prepare_linked_requirement\n local_file = unpack_url(\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/operations/prepare.py”, line 249, in unpack_url\n unpack_file(file.path, location, file.content_type)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/utils/unpacking.py”, line 256, in unpack_file\n untar_file(filename, location)\n File “/edx/app/edx_ansible/venvs/edx_ansible/lib/python3.8/site-packages/pip/_internal/utils/unpacking.py”, line 226, in untar_file\n with open(path, “wb”) as destfp:\nUnicodeEncodeError: ‘latin-1’ codec can’t encode characters in position 132-135: ordinal not in range(256)\n”}

UnicodeEncodeError: ‘latin-1’ codec can’t encode characters in position
UnicodeEncodeError: ‘latin-1’ codec can’t encode characters in position 132-135: ordinal not in range(256)\n"}

That was resolved by running the below command
pip install setdefaultencoding

That did it. Hope you guys find it helpful.