I encountered the following error when trying to bundle a GUI software (Manjaro Linux):
ImportError: The 'packaging' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.
This issue is already mentioned somewhere: https://github.com/pyinstaller/pyinstaller/issues/1781
However, the fix reported there was not enough, used alone.
Hopefully a guy on SO had the solution http://stackoverflow.com/questions/34921474/pyinstaller-on-32-bit-linux-importerror-the-six-package-is-required.
I had to downgrade setuptools to 19.2, but I also had to import some modules in my code explicitly:
import packaging
import packaging.version
import packaging.specifiers
import packaging.requirements
I'm reporting this problem in case someone needs a fix.
Thank you for posting your solution, I believe it saved me a bunch of work!
Just wanted to let you know, and pitch in an alternative solution that worked for me. Instead of changing the code, I added "packaging" as a hidden import. That is, I used
pyinstaller --hidden-import=packaging --hidden-import=packaging --hidden-import=packaging.version --hidden-import=packaging.specifiers --hidden-import=packaging.requirements main.py
Fix for this in progress.
Most helpful comment
Thank you for posting your solution, I believe it saved me a bunch of work!
Just wanted to let you know, and pitch in an alternative solution that worked for me. Instead of changing the code, I added "packaging" as a hidden import. That is, I used