I was following this guide https://realpython.com/blog/python/setting-up-a-simple-ocr-server/ and got to the part where I run cli.py python flask_server/cli.py
python flask_server/cli.py
In my case, I was running it in Jupyter so I used this command,
! pip install --user pytesseract
But I forgot to restart the kernal. You need to restart the kernal after installing the pakcage