[#1149] Fix some pep8 issues and problems with pip requirements on travis