This error is most often caused by attempting to load a 32 bit Python DLL into a 64 bit Excel process, or a 64 bit Python DLL into a 32 bit process.
You cannot mix 32 bit and 64 bit versions of Excel, PyXLL and Python. They must all be either 32 bit or all 64 bit.
See Do I have 32 bit or 64 bit Excel? if you’re not sure what version of Excel you’re using.
If you have multiple instances of Python installed you should configure PyXLL to use the correct one by setting executable in your pyxll.cfg file. See Installing the PyXLL Excel Add-In for more details.