Unable to install awsebcli due to missing setuptools



I’m using the following Gist to deploy to Elastic Beanstalk: https://gist.github.com/RobertoSchneiders/9e0e73e836a80d53a21e

It’s been working fine for a few months, but has just started failing. The error I get on sudo pip install awsebcli is OSError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/setuptools-3.4.4-py2.7.egg'. I tried to update setuptools using pip too, and get the same error.

Has anyone else seen this?


Having exactly the same issue, starting today, and was everything working ok since ever.


Same error here :frowning:


i have the same issue today.


I’m another one that has just started getting this issue today!


I’ve just got sudo -H pip install awsebcli --upgrade --ignore-installed to work. Seems like a Circle problem if we’re all getting it though…


Thanks, that change seems to have worked for me!

sudo -H pip install awsebcli --upgrade --ignore-installed


Great workaround @tomw ! We’re aware of the issue and are looking into the root cause.

Ryan Arlan


Ah totally makes sense. I thought I was going nuts.


Same here.


Started having this same error today too.


Same here, quick fix I did was
sudo pip install awsebcli==3.7.4


Any updates on this? We’re still having this issue (started Friday afternoon PST).

Best way to auto deploy to elastic beanstalk

this fix is also working for us sudo -H pip install awsebcli --upgrade --ignore-installed. Curious why a clean install is needed :confused:


Hey @ryanarlan22, any update on this?


We’re still working on a permanent fix, but using the sudo -H pip install awsebcli --upgrade --ignore-installed does work as a workaround for now. We’ll update this Discuss topic when a permanent fix has been set up.

Builds failing during awsebcli install

Any timeframe on when a fix will be set up? At some point this stops being a workaround and ends up being the way.


Just to add to this, awscli also fails to install, I had to do this to finally get it going:

    - sudo pip install -U --ignore-installed requests[security]
    - sudo pip install -U awscli
    - sudo pip install -U --ignore-installed -r requirements/circle.txt

The initial sudo, sudo’s me down the line or else I get Permission Denied errors in various places for sudo -> not sudo related reasons, which is obviously undesirable.

The reason I needed to install requests[security] is from the following error when awscli initially tried to install:

/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.

So to get around that InsecurePlatformWarning I need the packages represented by requests[security] When installing those packages the following error is presented when it’s not under sudo:

Installing collected packages: idna, setuptools, enum34, ipaddress, pycparser, cffi, cryptography, pyOpenSSL, ndg-httpsclient, requests
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 317, in run
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 732, in install
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 835, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 1030, in move_wheel_files
  File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 344, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 315, in clobber
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 83, in ensure_dir
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/idna'

It’s a whole fun chain of events =)


Solution - https://gist.github.com/RobertoSchneiders/9e0e73e836a80d53a21e#gistcomment-1759346