Try https://github.com/thomasmanjooran/ai-reqs. Easy to install and use. Also reads Jupyter Notebooks for dependencies., and no encoding issues.
I developed it myself, when I ran to similar issues.