Назад | Перейти на главную страницу

pip не обновляет awscli

Я не нашел никаких ссылок на это в Google, но у меня эта проблема буквально на десятках экземпляров AWS EC2 CentOS. Если awscli еще не существует, он устанавливается нормально. Однако, начиная с v1.4.3, любая попытка обновления до> = 1.4.4 ('pip install --upgrade awscli') приводит к следующим ошибкам:

Downloading/unpacking awscli from https://pypi.python.org/packages/source/a/awscli/awscli-1.4.4.tar.gz#md5=3e9defe3470db63b88f91ab236dcfec2
  Running setup.py egg_info for package awscli
    warning: no files found matching 'LICENSE.txt'
    warning: no files found matching 'requirements.txt'
    warning: no files found matching '*.rst' under directory 'awscli/examples'
    warning: no files found matching '*.json' under directory 'awscli/data'
Requirement already up-to-date: botocore>=0.63.0,<0.64.0 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already up-to-date: bcdoc>=0.12.0,<0.13.0 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already up-to-date: six>=1.1.0 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already up-to-date: colorama==0.2.5 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already up-to-date: docutils>=0.10 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already up-to-date: rsa==3.1.2 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already up-to-date: argparse>=1.1 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already up-to-date: jmespath==0.4.1 in /usr/lib/python2.6/site-packages (from botocore>=0.63.0,<0.64.0->awscli)
Requirement already up-to-date: python-dateutil>=2.1 in /usr/lib/python2.6/site-packages (from botocore>=0.63.0,<0.64.0->awscli)
Requirement already up-to-date: ordereddict==1.1 in /usr/lib/python2.6/site-packages (from botocore>=0.63.0,<0.64.0->awscli)
Requirement already up-to-date: simplejson==3.3.0 in /usr/lib/python2.6/site-packages (from botocore>=0.63.0,<0.64.0->awscli)
Requirement already up-to-date: pyasn1>=0.1.3 in /usr/lib/python2.6/site-packages (from rsa==3.1.2->awscli)
Installing collected packages: awscli
  Found existing installation: awscli 1.4.3
    Uninstalling awscli:
      Successfully uninstalled awscli
  Running setup.py install for awscli
    error: file '/tmp/pip-build-root/awscli/bin/aws' does not exist
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/awscli/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-V1jT9z-record/install-record.txt --single-version-externally-managed:
    running install

running build

running build_scripts

error: file '/tmp/pip-build-root/awscli/bin/aws' does not exist

----------------------------------------
  Rolling back uninstall of awscli
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/awscli/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-V1jT9z-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/awscli
Storing complete log in /root/.pip/pip.log

А затем из /root/.pip/pip.log:

  Running setup.py install for awscli

    Running command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/awscli/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1n2lji-record/install-record.txt --single-version-externally-managed
    running install
    running build
    running build_scripts
    error: file '/tmp/pip-build-root/awscli/bin/aws' does not exist

Те же ошибки возникают на машинах с обновлениями версии aws 1.4.3 -> 1.4.4, 1.4.3 -> 1.5.0 и 1.4.4 -> 1.5.0.

Оказалось, что были и другие зависимости awscli, которые не обновлялись, если я пытался обновить их напрямую, каждая из которых не имела тех же основных проблем. Я не уверен, в чем именно была проблема, но удаление /tmp/pip-build-root папка исправила все проблемы.