Hey guys,

When I try to install Fabric by running the command “pip install fabric requests” (on an instance from your AWS AMI) I received the following error:

Downloading/unpacking fabric
Downloading Fabric-1.12.0-py2-none-any.whl (92kB): 92kB downloaded
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/local/lib/python2.7/dist-packages
Downloading/unpacking paramiko<2.0,>=1.10 (from fabric)
Downloading paramiko-1.17.2-py2.py3-none-any.whl (172kB): 172kB downloaded
Downloading/unpacking ecdsa<2.0,>=0.11 (from paramiko<2.0,>=1.10->fabric)
Downloading ecdsa-0.13-py2.py3-none-any.whl (86kB): 86kB downloaded
Requirement already satisfied (use --upgrade to upgrade): pycrypto!=2.4,<3.0,>=2.1 in /usr/local/lib/python2.7/dist-packages (from paramiko<2.0,>=1.10->fabric)
Installing collected packages: fabric, paramiko, ecdsa
Cleaning up…
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/pip/basecommand.py”, line 122, in main
status = self.run(options, args)
File “/usr/lib/python2.7/dist-packages/pip/commands/install.py”, line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 1436, in install
requirement.install(install_options, global_options, *args, **kwargs)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 672, in install
self.move_wheel_files(self.source_dir, root=root)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 902, in move_wheel_files
File “/usr/lib/python2.7/dist-packages/pip/wheel.py”, line 206, in move_wheel_files
clobber(source, lib_dir, True)
File “/usr/lib/python2.7/dist-packages/pip/wheel.py”, line 193, in clobber
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/Fabric-1.12.0.dist-info’

Storing debug log for failure in /home/ubuntu/.pip/pip.log

You probably need to run the pip install command with sudo.

But it’s important to note that the script won’t work from the AWS instance, because it expects to connect over SSH to the Redash instance. It’s designed to be executed on the machine you use to connect to the Redash instance.

If you still want to use it from the AWS instance, you will need to SSH into it while forwarding the SSH agent.

And, yes, I agree – it’s not convenient. We do plan to rewrite the script so it’s possible to run it locally…

Yes, the sudo did the trick.

Can you elaborate on how to run it locally with SSH?


You connect to your instance with ssh -A and then run the fab command as instructed but use localhost as host.