ModuleNotFoundError: No module named 'pkg_resources.py2_warn'

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ModuleNotFoundError: No module named 'pkg_resources.py2_warn'

ankit kumar
Hi,
I am getting No module named 'pkg_resources.py2_warn' in pyinstaller when running the exe.
Things that I have tried:
                                   1. Updating the setuptools and pyinstaller (although I am already having the latest ones).
                                   2. Used try except block with pass to ignore exceptions in pyi_rth_pkgres.py and pyimod03_importers.py by taking the reference from one of the post from this forum.
                                   
What I assume is that if I comment out the import statement of dialogflow_v2 in my script it works fine otherwise if I run the exe with dialogflow_v2 import statement, I get below error:

                                                                                File "site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 13, in <module>
                                                                                File "c:\users\ankit.bw.kumar\.conda\envs\envforpyqt\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
                                                                                exec(bytecode, module.__dict__)
                                                                                File "pkg_resources\__init__.py", line 86, in <module>
                                                                                ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
                                                                                [17696] Failed to execute script pyi_rth_pkgres.

Thanks & Regards,
Ankit Kumar

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/5c61bbfd-fe0c-42fa-9901-0c5256808247%40googlegroups.com.