Of course, if you package a file and provide packages that are covered by a given license, you MUST provide copyright notices if that license requires them (e.g., MIT, BSD, GNU GPL, and others like that).
In practice, many developers may avoid this, but if you want to be completely correct, you should include all the information.
The exception to this rule is when the user downloads the packages themselves (via
requirements.txt file, but if you package to an EXE, I doubt this applies to you.
For Python, you can use the
pip-licenses command, but it lists all the packages you have installed, not those required by
requirements.txt or others, so if you want to use this tool, create a virtual environment.
I recommend this combination, but remember that you should adapt it to yourself.
pip-licenses --with-notice-file --with-license-file --output-file ThirdPartyNotices.html --format html --no-license-path
You can change the format to another, like plain text or CSV. Here, you can read the details.
pip-licenses must be installed beforehand
THIS IS NOT LEGAL ADVICE