enough-analyst-54434
05/12/2021, 1:56 PMpython_library()
at the top of the BUILD file. As you found out - that's critical.
It's also easy to miss because its not clear why you should need to have it. You might be able to save pain going forward (I still often forget to add a python_library) by using ./pants tailor
. More on that here: https://www.pantsbuild.org/docs/troubleshooting#import-errors-and-missing-dependencies