Question: I am building a project just for fun and I want to turn it into an exe but it gives me the error

`PyInstaller.exceptions.ImportErrorWhenRunningHook: Failed to import module __PyInstaller_hooks_0_IPython required by hook for module c:\users\waddy\appdata\local\programs\python\python39\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-IPython.py. Please check whether module __PyInstaller_hooks_0_IPython actually exists and whether the hook is compatible with your version of c:\users\waddy\appdata\local\programs\python\python39\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-IPython.py:`

I'm working with python version `3.9.1` and pyinstaller `4.5.1`. I tried using the solution given [here](https://stackoverflow.com/questions/67815939/pyinstaller-failed-to-import-module-pyinstaller-hooks-0-pydoc) but it gives me another error `AttributeError: Module 'PyQt5' has no attribute '__version__'`

How could I fix this?

Answer: 
In my case this exception was caused by missing `text-unidecode` package.
It was resolved by

```
pip install text-unidecode

```

Look complete traceback of exception and see if there is any other package missing in your case.
Try to uninstall `pyinstaller` and re-install it using `pip`

And if it doesn't work for you, this may will:

<https://github.com/pyinstaller/pyinstaller/issues/2114>