This error appeared after a fresh installation of Python 3.6 from source on OpenSuse, followed by an installation of the libphidget22 library from source and building the modules for Python.
The usual reason would be that the library was not installed correctly, or perhaps something was amiss in Python's installation, but that was not the case here. This error is mentioned frequently in on-line forums but rarely a resolution.
In this instance, the cause was that Python was searching to load a dynamic library and using the environment variable LD_LIBRARY_PATH. That variable did not by default include /usr/local/lib or /usr/local/lib64.
Check the variable with
and if it does not show where the libphidget22 libraries are located, add it with
to have both in the search path. This lines can be made systemwide by including them in the system profile.local too.