I am trying to load a CUDA library compiled from source into a Python program. On my Windows machine, it successfully loads the code. However, on my university's Unix computer cluster, it fails with the error:

ImportError: dynamic module does not define module export function
  (PyInit_deform_conv_cuda)

I have located the actual *.so file that was produced by the compilation process and discovered that grep finds an instance of 'PyInit_deform_conv_cuda' in it.
That makes me think that maybe the loader is loading the wrong file or something. I was hoping to debug the loader, but my trace statements never execute.
I am running Python 3.7 on both machines.
Can anybody tell what might be going wrong? Either with the loading of the module or with my debugging efforts?
I would never have guessed this and I feel kind of stupid. 
The problem was that I installed the library into one Python environment and tried to run it from another. 
I'm posting this in case someone else makes this mistake. The error message wasn't at all helpful int this case.
Python fails to load C++ library even though PyInit_ entry exists