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?

5 Likes

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…

1 Like

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.
Thanks!

Ryan Arlan

1 Like

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

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

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.

1 Like

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

1 Like

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

dependencies:
  override:
    - 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.
  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
Exception:
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
    prefix=options.prefix_path,
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 732, in install
    **kwargs
  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
    isolated=self.isolated,
  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
    ensure_dir(destdir)
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  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 =)

1 Like

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

1 Like