Hi,
I have installed OQ v3.24.1 via the exe installer into c:\Users\peter\AppData\Local\Programs\OpenQuake Engine dir.
Then via pip jupyter: pip install jupyter
c:\Users\peter\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\
I also add the paths to environment path variable:
c:\Users\peter\AppData\Local\Programs\OpenQuake Engine\python3\;c:\Users\peter\AppData\Local\Programs\OpenQuake Engine\python3\Scripts\;C:\Users\peter\AppData\Local\Programs\OpenQuake Engine\GMT\bin
So whenever I open cmd window, I can use python and also oq or simply type "jupyter notebook" and it starts jupyter environment (for me in firefox).
After starting jupyter notebook, I can put do
from openquake.smt.residuals.parsers.esm_flatfile_parser import ESMFlatfileParser
Maybe you just need to correct the import line? (probably it was renamed/relocated within the model building toolkit codebase?)
Peter