Pip problems - Could not install packages due to an EnvironmentError

You can make pip to install the package within the virtualenv library location:

sudo -H venv/bin/pip install fabric

The permission denied error is raised because you've already borked your virtual environment by installing with sudo. Run

$ sudo chown -R david:staff /Users/david/Documents/projects/uptimeapp/env

to fix the permissions. Maybe it's even wise to fix the permissions for the whole home dir, should you have other permission issues:

$ sudo chown -R david:staff /Users/david/

Now reinstalling packages should work again:

$ source /Users/david/Documents/projects/uptimeapp/env/bin/activate
$ (env) pip uninstall -y fabric
$ (env) pip install fabric

'libssh2.h' file not found

means that before installing ssh-python, you need to install the according lib first:

$ brew install libssh2