Check whether you have more than one python versions that is separate. I faced the issue when my module was installed in python version 3.13 and the pyinstaller was running on python version 3.12
if you're on windows use where python
to find how many versions are there and where they are located