What does flake8 plugin failed to find in an lsstsw build mean?

When I get errors finding the flake8 plug in in the lsstsw build, what should I do to get this round properly?

_pytest.vendored_packages.pluggy.PluginValidationError: Plugin 'flake8' could not be loaded: (setuptools 27.2.0 (/Volumes/PS1/lsstsw/miniconda/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg), Requirement.parse('setuptools>=30'), set(['flake8']))!

Have you installed flake8 in your lsstsw python? If not:

  • Make sure your lsstsw python is the current python
  • conda install flake8

I certainly haven’t done so. I haven’t tracked this issue clearly. Does this mean that lsstsw does not keep its own python up-to-date with required packages?

flake8 is an LSST-provided package which is required (via pytest_flake8) by sconsUtils. I’m no lsstsw-guru, but I’d be surprised to hear that you have to install it manually.

See also DM-12454, which is similar to, but not the same as, this issue — it doesn’t contain a solution, but it might help in figuring out where to start looking.

You definitely shouldn’t have to install flake8 on lsstsw. Did you run rebuild -u to update your repo list, etc?

Your setuptools is ancient. You need to update it.

Requirement.parse(‘setuptools>=30’), set([‘flake8’]))!

@timj Good catch! Thank you.

conda install setuptools upgrade my lsstsw conda install from setuptools 27.2 to 38.4.

sconsUtils and further modules now successfully compile and install.