Pylint cannot be run from within Jenkins Pylint cannot be run from within Jenkins jenkins jenkins

Pylint cannot be run from within Jenkins


The problem was in the Jenkins shell and the lack of virtualenv, apparently - even though Jenkins was configured to use bin/bash.

The way I solved it was:

            steps {            sh 'bash ./lintpython.sh'        }

Inside lintpython.sh:

#!/bin/bashpython3 -m venv ~/.somevenvsource ~/.somevenv/bin/activatepip install --upgrade pip &&\  pip install -r requirements.txtpylint app.py