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