Python packaging No module named 'PyQt5'

I’m trying to upgrade GitHub - pyqtgraph/pyqtgraph: Fast data visualization and GUI tools for scientific / engineering applications (defined here https://github.com/NixOS/nixpkgs/blob/3fe694c4156b84dac12627685c7ae592a71e2206/pkgs/development/python-modules/pyqtgraph/default.nix) to the latest version (0.13.3), but it’s failing on tests in this file:

FAILED pyqtgraph/examples/test_examples.py::testExamples[ logAxis.py - PyQt5 ] - Failed: 

They are all failing like this:

______________________ testExamples[ logAxis.py - PyQt5 ] ______________________


Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
ModuleNotFoundError: No module named 'PyQt5'

Disabling them with:

  disabledTestPaths = [
    "pyqtgraph/examples/test_examples.py"
  ];

worked, but I was wondering if there’s a better way. Any hints?