13
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CircleCIで pip install awsebcliがコケる問題の回避

Last updated at Posted at 2016-04-08

TL;DR

  • CircleCIからElasticBeanstalkにデプロイするために awsebcli をインストールしている環境
  • awsebcli が version 3.7.5 になったことでコケるようになった
  • versionを固定することで回避

追記修正

  • pythonのversionを上げる事で回避できるようなので修正

エラー内容

sudo pip install --upgrade -q awsebcli
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 9, in <module>
    load_entry_point('pip==8.1.1', 'console_scripts', 'pip')()
  File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 217, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 246, in main
    pip_version_check(session)
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/outdated.py", line 102, in pip_version_check
    installed_version = get_installed_version("pip")
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 848, in get_installed_version
    working_set = pkg_resources.WorkingSet()
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 626, in __init__
    self.add_entry(entry)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 682, in add_entry
    for dist in find_distributions(entry, True):
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2080, in find_eggs_in_zip
    if metadata.has_metadata('PKG-INFO'):
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1610, in has_metadata
    return self.egg_info and self._has(self._fn(self.egg_info, name))
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1968, in _has
    return zip_path in self.zipinfo or zip_path in self._index()
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1848, in zipinfo
    return self._zip_manifests.load(self.loader.archive)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1788, in load
    mtime = os.stat(path).st_mtime
OSError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/setuptools-3.4.4-py2.7.egg'

sudo pip install --upgrade -q awsebcli returned exit code 1

Action failed: sudo pip install --upgrade -q awsebcli

もともとの設定

circle.yml
machine:
  timezone:
    Asia/Tokyo

~~ snip ~~

dependencies:
  pre:
    - 'sudo pip install -q awsebcli'
    
~~ snip ~~

回避方法: awsebcliのversionを固定する方法

circle.yml
machine:
  timezone:
    Asia/Tokyo

~~ snip ~~

dependencies:
  pre:
    - 'sudo pip install -q awsebcli==3.7.4'
    
~~ snip ~~

回避方法: pythonのversionを上げる方法

circle.yml
machine:
  python:
    version: 2.7.9
  timezone:
    Asia/Tokyo
  
~~ snip ~~

dependencies:
  pre:
    - pip install awsebcli
    
~~ snip ~~

13
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?